I have tried a few different scrips for AHK but I like this one, I have bound the F1, F2 and F3 to different buttons on my mouse so it works really good, just push once to start and once to stop or just move from F1 to F2 and it starts the next script.
WinGet, wowid, List, World of Warcraft
#ifWinActive World of Warcraft
; to force the hotkey only to WoW
toggleST := false
toggleAOE := false
toggleHealdmg := false
CustomColor = 000000 ; Can be any RGB color (it will be made transparent below).
Gui +LastFound +AlwaysOnTop +ToolWindow -Caption ; +ToolWindow avoids a taskbar button and an alt-tab menu item.
Gui, Color, %CustomColor%
Gui, Font, s14 q3 ; q3 to non-antialias the text, only works in AHK_L
Gui, Add, Text, vMyText cLime w200 +Center
Gui, Add, Text, vMyText2 cLime w300
Gui, Add, Text, vMyText3 cLime w300
WinSet, TransColor, %CustomColor% 150
sw := A_ScreenWidth/100
sh := A_ScreenHeight/100
Gui, Show, % “x” . sw44 . " y" sh2, NoActivate ; NoActivate avoids deactivating the currently active window.
return
$F1::
if(toggle1) {
toggle1 := false
SetTimer, Send1, Off
GuiControl, MyText,
} else {
toggle1 := true
toggle2 := false
toggle3 := false
SetTimer, Send2, Off
SetTimer, Send3, Off
GuiControl, MyText2,
GuiControl, MyText3,
; Choose a delay here!
SetTimer, Send1, 150
GuiControl, MyText, F1 ENABLED
}
return
$F2::
if(toggle2) {
toggle2 := false
SetTimer, Send2, Off
GuiControl, MyText2,
} else {
toggle2 := true
toggle1 := false
toggle3 := false
SetTimer, Send1, Off
SetTimer, Send3, Off
GuiControl, MyText,
GuiControl, MyText3,
; Choose a delay here!
SetTimer, Send2, 300
GuiControl, MyText2, F2 ENABLED
}
return
$F3::
if(toggle3) {
toggle3 := false
SetTimer, Send3, Off
GuiControl, MyText3,
} else {
toggle3 := true
toggle1 := false
toggle2 := false
SetTimer, Send1, Off
SetTimer, Send2, Off
GuiControl, MyText,
GuiControl, MyText2,
; Choose a delay here!
SetTimer, Send3, 300
GuiControl, MyText3, F3 ENABLED
}
return
Send1:
ifWinActive, World of Warcraft
Send {F1}
return
Send2:
ifWinActive, World of Warcraft
Send {F2}
return
Send3:
ifWinActive, World of Warcraft
Send {F3}
return
#ifWinActive
; to end the WoW key binding