Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 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. #SingleInstance force
  4. SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
  5. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
  6.  
  7. SetGlobals(void)
  8. {
  9. global
  10. endLoop := 0
  11. return
  12. }
  13.  
  14. F5 UP::
  15. {
  16. SleepDuration := 1000
  17. Loop
  18. {
  19. if(endLoop = 1)
  20. {
  21. endLoop := 0
  22. break
  23. }
  24. Send, {W DOWN}
  25. Sleep, %SleepDuration%
  26. Send, {W UP}
  27. Sleep, %SleepDuration%
  28. if(endLoop = 1)
  29. {
  30. endLoop := 0
  31. break
  32. }
  33. Send, {S DOWN}
  34. Sleep, %SleepDuration%
  35. Send, {S UP}
  36. Sleep, %SleepDuration%
  37. if(endLoop = 1)
  38. {
  39. endLoop := 0
  40. break
  41. }
  42. Send, {Space DOWN}
  43. Sleep, %SleepDuration%
  44. Send, {Space UP}
  45. Sleep, %SleepDuration%
  46. }
  47. return
  48. }
  49.  
  50. F6 UP::
  51. {
  52. if(endLoop = 0)
  53. endLoop = 1
  54. else
  55. endLoop = 0
  56. return
  57. }
  58.  
  59. F4 UP::
  60. {
  61. SetGlobals(0)
  62. return
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement