AutoHotkey

A loop function example.Pressing F5 to start,press again to stop.

Wiki: AutoHotkey
Download it from Here
=====================================================================
#MaxThreadsPerHotkey 3
F5:: ; Win+Z hotkey.
#MaxThreadsPerHotkey 1
if KeepWinZRunning = y ; This means an underlying thread is already running the loop below.
{
KeepWinZRunning = ; Make it blank to signal that thread's loop to stop.
return ; End this thread so that the one underneath will resume and see the change.
}
; Otherwise:
KeepWinZRunning = y
Loop,
{
MouseClick, left, 53, 223
Sleep, 600
MouseClick, left, 534, 475
sleep,600
if KeepWinZRunning = ; The user signaled the loop to stop by pressing Win-Z again.
break ; Break out of this loop.
}
KeepWinZRunning = ; Reset in preparation for the next press of this hotkey.
return
=====================================================================

0 comments: