Pvp talent 3 macro?

Is there a way to make a macro like:

#showtooltip pvp talent 3
/cast pvp talent 3

I often use my third pvp talent as a flex pick, and I run hidden bars on my screen and only show cooldowns. Often times in the pre phase of arena it takes a lot of time to show, unlock, swap the ability twice (for the hidden and visual bars), then relock, and hide the proper bar again. It’s very tedious and one time I even ran short of time and fat finger a bunch of wrong talents.

10 characters

Hi a little confused
for specifically number 3 do I use

#showtooltip
/cast SPELL3
/run local spell3=GetSpellInfo SetMacroSpell(GetRunningMacro()

I’m a little confused on what the last line means. I see its getting spell info, but do I replace G with spell3? Does (GetRunningMacro() mean it will search my macros, and if I fill the () with the macro name it swap to that macro instead of just the spell?

There isn’t a great way for macros to know what pvp talents you have.

Elvenbane’s macro takes a list of spells and will use the first one that exists in your spell book.
List any spell that you might pick for your third pvp talent.

The /run line sets the icon. #showtooltip will always choose the first spell, even if you don’t know it, so you have to do this to get the right icon.

It only updates the icon when you use the macro so the icon may be incorrect when you first log in or after switching talents. Using it once should update the icon.

SPELL 1-3 are just placeholders, they don’t map to any specific 1 through 3 options. You can also shrink or expand the list to encompass whatever non-passive options you might take as your 3rd pvptalent.

Choosing between 2 spells:

#showtooltip
/cast SPELL1
/cast SPELL2
/run local G=GetSpellInfo SetMacroSpell(GetRunningMacro(), G"SPELL1" or G"SPELL2")

Choosing between 4 spells:

#showtooltip
/cast SPELL1
/cast SPELL2
/cast SPELL3
/cast SPELL4
/run local G=GetSpellInfo SetMacroSpell(GetRunningMacro(), G"SPELL1" or G"SPELL2" or G"SPELL3" or G"SPELL4")

If you want specific code, provide a list of talents you normally choose as your 3rd option.