#MaxThreadsPerHotkey 3
F12:: ; Win+Z hotkey (change this hotkey to suit your preferences).
#MaxThreadsPerHotkey 1
if KeepWinZRunning ; This means an underlying thread is already running the loop below.
{
KeepWinZRunning := false ; Signal that thread's loop to stop.
return ; End this thread so that the one underneath will resume and see the change made by the line above.
}
; Otherwise:
KeepWinZRunning := true
Loop
{
; The next four lines are the action you want to repeat (update them to suit your preferences):
Send {Numpad0 down}
Sleep 100
Send {Numpad0 up}
; But leave the rest below unchanged.
if not KeepWinZRunning ; The user signaled the loop to stop by pressing Win-Z again.
break ; Break out of this loop.
}
KeepWinZRunning := false ; Reset in preparation for the next press of this hotkey.
return
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"text\/x-go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"mysql","xml":"xml","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","ecmascript":"javascript","groovy":"text\/x-groovy","haskell":"text\/x-haskell","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mysql":"mysql","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"plsql","properties":"text\/x-properties","scheme":"text\/x-scheme","vb":"text\/vbscript","vbnet":"text\/vbscript","verilog":"text\/x-verilog","yaml":"text\/x-yaml"}