Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;NOTE THE AUTOCLICKER MUST BE OFF FOR THE TOGGLE TO WORK TURNING OFF THE HOTKEY
- Delay := .04 ; Seconds between each click (decimals supported)
- 0Flag := !0Flag ; Turns on the 0 flag
- Hotkey, ~0, ClickToggler
- ClickToggler:
- Toggler := !Toggler ; Toggles the variable
- If (Toggler) ; runs when toggler is active
- {
- Sleep, 200 ; Let the user let up the mouse button
- Loop
- {
- KeyWait, 0, D T%Delay% ; Waits for key down for set number of seconds
- If ErrorLevel != 1 ; Errorlevel to determine the keywait evaluation
- {
- Toggler := !Toggler ; toggles the toggler to off
- break ;breaks from loop
- }
- Else
- SendInput, {0}
- }
- }
- return
- F1::
- 0Flag := !0Flag ;toggles the flag and turns on/off the hotkey
- If (!0Flag)
- Hotkey, ~0, Off
- else
- Hotkey, ~0, On
- return
- Esc::ExitApp ; Emergency exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement