Vanish/Stealth sharing the same button macro?

Hello, leveling a Rogue, and I am wondering if there is a macro that uses Vanish while in combat (to get out of combat, obviously) but uses Stealth when not in combat.

I would like to use the same button for both abilities, and I know Vanish has a 2 min cooldown, which is not ideal to use if you are not in combat at the moment.

Thanks in advance.

#showtooltip
/cast [combat] Vanish; Stealth

Thanks, that seems to work. :slight_smile: