Code: Select all
winTitle = ahk_exe TheGame.exe
#If WinActive(winTitle)
'::
Toggle := !Toggle
If (Toggle=True) {
SoundBeep , 2050, 90
SetTimer, var, 30
} else {
SoundBeep , 600, 90
SetTimer, var, Off
}
Return
var:
Send, {q}
Return
SO when i do this manually, with my finger, it works normally. WHen i do it with ahk though, it wont let me sprint. Ion understand why.