Advertisement
Guest User

Untitled

a guest
Dec 1st, 2015
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. ;NOTE THE AUTOCLICKER MUST BE OFF FOR THE TOGGLE TO WORK TURNING OFF THE HOTKEY
  2.  
  3. Delay := .04 ; Seconds between each click (decimals supported)
  4. 0Flag := !0Flag ; Turns on the 0 flag
  5. Hotkey, ~0, ClickToggler
  6.  
  7. ClickToggler:
  8. Toggler := !Toggler ; Toggles the variable
  9. If (Toggler) ; runs when toggler is active
  10. {
  11. Sleep, 200 ; Let the user let up the mouse button
  12. Loop
  13. {
  14. KeyWait, 0, D T%Delay% ; Waits for key down for set number of seconds
  15. If ErrorLevel != 1 ; Errorlevel to determine the keywait evaluation
  16. {
  17. Toggler := !Toggler ; toggles the toggler to off
  18. break ;breaks from loop
  19. }
  20. Else
  21. SendInput, {0}
  22. }
  23. }
  24. return
  25.  
  26. F1::
  27. 0Flag := !0Flag ;toggles the flag and turns on/off the hotkey
  28. If (!0Flag)
  29. Hotkey, ~0, Off
  30. else
  31. Hotkey, ~0, On
  32. return
  33.  
  34.  
  35.  
  36. Esc::ExitApp ; Emergency exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement