help making infwinactive working

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Rlentless
Posts: 13
Joined: 19 Apr 2018, 06:16

help making infwinactive working

19 Apr 2018, 06:29

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?

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot] and 93 guests