AHK With Mods -- When Using Bar Addons

This can be modified as to what keys you want spammed. Bar addons will use a modifier key to switch bars and the keystroke is then deleted from the queue.

This gets around that as the bar-switching modifier key is handled by the bar addon then the same key is sent again by AHK.

#IfWinActive World of Warcraft

toggle1 := 0
toggle2 := 0

SetTimer, PressKey1, 100
SetTimer, PressKey2, 100

$*1::toggle1 := !toggle1
$*2::toggle2 := !toggle2

PressKey1:
If toggle1
{
If GetKeyState(“Control”, “P”) && GetKeyState(“Shift”)
Send +^1
If GetKeyState(“Control”, “P”)
Send ^1
If GetKeyState(“Shift”, “P”)
Send +1
toggle2 := 0
}
Return

PressKey2:
If toggle2
{
If GetKeyState(“Control”, “P”) && GetKeyState(“Shift”)
Send +^2
If GetKeyState(“Control”, “P”)
Send ^2
If GetKeyState(“Shift”, “P”)
Send +2
}
Return

#IfWinActive