Hi, I'm trying to make a script that will do a few things, but I can't wrap my head around it.
I'm trying to make a script that holds space all the time, presses F4 and Z every 0.5 second and is only working on a specific .exe without affecting other software.
Code: Select all
#Persistent
SetTimer, PressTheKey, 500
Return
IfWinActive, ;DivineWorld.exe
PressTheKey:
Send, {space down}
Send, {F4 down}
Sleep 10
Send, {F4 up}
Send, {z down}
Sleep 10
Send, {z up}
Return
Pressing works however it's still affecting other open windows than the .exe that I want. Also another question, if I have a few of .exe open with the same name (divineworld.exe in my case), is there a way of making the ahk script affect only one divineworld.exe without affecting another divineworld.exe?