Advertisement
Guest User

Untitled

a guest
May 20th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
  2. ; #Warn ; Enable warnings to assist with detecting common errors.
  3. SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
  4. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
  5.  
  6. #MaxThreadsPerHotkey 2
  7.  
  8. running := false
  9. stop := false
  10.  
  11. ~XButton1::
  12.  
  13. if(!running) {
  14. running := true
  15. }
  16. else {
  17. stop := true
  18. return
  19. }
  20.  
  21. loop {
  22.  
  23. Send {1} ; example sending key "a"
  24.  
  25. if(stop) {
  26. running := false
  27. stop := false
  28. break
  29. }
  30.  
  31. Sleep, 200
  32.  
  33. }
  34.  
  35. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement