Post by Neffi
Just tested to make sure. The above does not work as intended. If the talent you
do have isn't first, the icon will show up a as the question mark, and no tooltip will show. I would say this should be reported as a bug, but it's not necessarily a bug. It's a consequence of how the default UI works with regards to macros. It scans line-by-line until the
conditionals for a given line return something valid. It then tries to use that for the icon. In the case, the first "valid" thing returned is always going to be the first spell listed, whether you know it or not. I hope to see this fixed soon to be a bit smarter, but don't hold your breath. We've been making requests for UI/API features for a while, and few of them ever get considered.
Your only option is regarding dual-spec. You can set up your macro like so:
#showtooltip
/use spell1; spell2
Where
spell1 is a spell from your primary spec, and
spell2 is a spell from your secondary spec. This will work, but it obviously limits you to using 2 set specs. If you frequently shift talents around within your specs, you run into the same problem anyway.
There's just no other way to do this without an addon there to automatically switch it for you. One might exist already, but I'm not aware of any. You can try searching for an addon.
Edit: A 30-second search yielded one such addon that does this.
infMopTalentMacroes. If you don't want to run the addon, the author actually pointed out an interesting fix:
#showtooltip
/use ability1
/use ability2
/use ability3
/run SetMacroSpell("
name", GetSpellInfo"
ability1" or GetSpellInfo"
ability2" or "
ability3")
Where
name is the exact name of the macro (must be unique), and each
abilityN is replaced with the exact name of the spells being tried. The only caveat to this approach is that you have to click the macro once for it to show up properly (eg when you first log in), otherwise it will still show up as "?" until first clicked/used.
I'd recommend just using the addon.