This is going to make you laugh, but your stuff is just a tiny bit jumbled up from making it work the way you want to:
[code:1]
WinGet, wowid, List, World of Warcraft
; *** Begin Action Bar sequence ***
#IfWinActive, World of Warcraft
~Shift & 1::
ControlSend,,{shift down}{1 down}{1 up}{shift up}, ahk_id %wowid1%
ControlSend,,{shift down}{1 down}{1 up}{shift up}, ahk_id %wowid2%
return
#IfWinActive, World of Warcraft
~Shift & 2::
ControlSend,,{shift down}{2 down}{2 up}{shift up}, ahk_id %wowid1%
ControlSend,,{shift down}{2 down}{2 up}{shift up}, ahk_id %wowid2%
return[/code:1]
By the by, I'm *just* starting to work with autohotkey, but the reason the switch was needed so that it only fires in WoW is because Autohotkey runs the script file line by line with the exception of hotkeys and hotstrings. So, you need that initial IF statement to run BEFORE the hotkey, so that IF it's NOT WoW active, SKIP this hotkey. Now... by my logic, you should be able to place a IfWinActive statement within a hotkey as well... but it just doesn't seem to work that way. *shrug*
Connect With Us