boiler wrote: ↑11 May 2021, 19:42
I can't tell you exactly how since you haven't shared any details of your program's window or its control if you need to send it directly to a particular control. Use the Window Spy tool that came with AHK, and read about
WinTitle and
ControlSend.
Alright, I got it to work, thank you.
Code: Select all
SetTitleMatchMode 2
/::
#Persistent
SetTimer, PressTheKey, 14000
return
PressTheKey:
ControlSend, ahk_parent, f, MORDHAU
Sleep 500
ControlSend, ahk_parent, f, MORDHAU
Sleep 1500
ControlSend, ahk_parent, {w down}, MORDHAU
Sleep 1500
ControlSend, ahk_parent, {w up}, MORDHAU
Sleep 1500
ControlSend, ahk_parent, {a down}, MORDHAU
Sleep 1500
ControlSend, ahk_parent, {a up}, MORDHAU
Sleep 1500
ControlSend, ahk_parent, {s down}, MORDHAU
Sleep 1500
ControlSend, ahk_parent, {s up}, MORDHAU
Sleep 1500
ControlSend, ahk_parent, {d down}, MORDHAU
Sleep 1500
ControlSend, ahk_parent, {d up}, MORDHAU
Sleep 1500
ControlSend, ahk_parent, x8, MORDHAU
ControlSend, ahk_parent, cc2, MORDHAU
Sleep 1500
return
.::Pause