Loop and pause by set Timer then press any key

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
asznee
Posts: 1
Joined: 09 Dec 2022, 16:39

Loop and pause by set Timer then press any key

Post by asznee » 09 Dec 2022, 16:53

1/ Hi want to make a loop by set timer and pause a sec then press any key and then repeat the script. :wave:
***Please help give me an idea?*** :think:

Code: Select all

<+E::
Pause, Toggle
SetTimer, AFK, % 15 * 60000
Loop {
KeyWait, Alt    ; Waits for the Alt key to be released before continuing the script.
Send {Alt down}
Send {RButton down}
Sleep 200
Send {RButton up}
Sleep 200
MouseClick, left, 1029, 541
Sleep 200
Send {Alt up}
Sleep 200
Send {T down}
Sleep 200
Send {T up}
Sleep 200
Send {Up down}
Sleep 200
Send {Up up}
Sleep 200
send {Enter}
Sleep 200
send {X down}
Sleep 200
send {X up}
Sleep 2000
}


AFK:
send {w down}
sleep 200
send {w up}
sleep 500

return
Last edited by gregster on 10 Dec 2022, 02:20, edited 1 time in total.
Reason: Topic moved from 'Scripts and Functions'.

Return to “Ask for Help (v1)”