Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #MaxThreadsPerHotkey 3
- #z:: ; 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):
- sendinput {right}
- sleep 12
- sendinput {right}
- sleep 12
- sendinput {left}
- sleep 12
- sendinput {left}
- sleep 12
- sendinput {enter}
- sleep 20
- ; 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
Add Comment
Please, Sign In to add comment