I have this code.
Code: Select all
#IfWinActive ahk_exe nioh.exe
#If A_IsSuspended
F2::
Suspend
soundbeep, 700, 300
return
#If
F2::
soundbeep, 300, 500
Suspend
return
$XButton1::
SetKeyDelay, 50, 50
Send {w down}{w up}
Send {Mbutton down}{Mbutton up}
Return
#IfWinActive
Anyway, i want this code to execute only when im inside the game, or maybe i should say when the process is active, the window that is, is active, in focus. But for some reason the script remains in effect whether the window is in focus or not. I may be tired, but i can't seem to figure out what's wrong here. Any help would be greatly appreciated!