Loop Macro

Share your favorite FastKeys commands
Post Reply
Drakemoor
Posts: 7
Joined: Feb 20th, ’23, 20:23

Post by Drakemoor » Feb 20th, ’23, 21:11

Hi,

I'm trying to loop a macro and it works well, but I can't make it stop by pressing escape.

Code: Select all

Loop, 3
{
CoordMode, Mouse, Screen
Sleep, 1203
MouseMove, 1644, 938
Send, {LButton}
}
Please help,
tnx
User avatar
Tom
Posts: 818
Joined: Nov 24th, ’15, 23:39

Post by Tom » Feb 21st, ’23, 21:31

This may work

Code: Select all

Loop, 3
{
CoordMode, Mouse, Screen
Sleep, 1203
MouseMove, 1644, 938
Send, {LButton}
Sleep, 10
if GetKeyState("Esc","P")
        break
}
perfectrecall
Posts: 18
Joined: Mar 20th, ’23, 08:48

Post by perfectrecall » Aug 16th, ’23, 06:59

Is there anything else I can do to stop command with one key? It did not run on my system.
glrobins
Posts: 7
Joined: Jan 29th, ’23, 11:57

Post by glrobins » Aug 17th, ’23, 00:01

;ctrl-x to stop
^x::ExitApp
User avatar
Marko
Posts: 1771
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Aug 20th, ’23, 20:48

Use the Reload shorcut to stop the loop - this can be defined in Preferences/General/Shortcuts.
perfectrecall
Posts: 18
Joined: Mar 20th, ’23, 08:48

Post by perfectrecall » Aug 21st, ’23, 08:03

Reloading shortcut is an exact solution but it has a lag. It takes 2-3 seconds to reload/stop the shortcut. Even if it reloads the program immediately, the commands continue 2-3 seconds.

I think typing ExitApp to Startup Script or creating new command for ExitApp is the perfect solution.
Post Reply