so pretend i got
press a to move mouse 100 times, and i want to stop it mid way with a hotkey\
the closest i could find is exitapp , which im pretty sure would stop all,butwhat if we want to \ press a key to stop it now but like the code, we can press a anytime to turn it back on, like a switch
thankyou
how to stop a function
Re: how to stop a function
Hallo,
try:
try:
Code: Select all
q::
SetTimer, MouseMove, 200
Counter := 100
Return
\::SetTimer, MouseMove, Off
a::SetTimer, MouseMove, On
MouseMove:
IF Counter:= Max(--Counter, 0)
MouseMove, 5, 0,, R
Else SetTimer, MouseMove, Off
Return