Advertisement
Tranquilsunrise

/u/Tranquilsunrise AutoHotkey Counting Script v2

Oct 16th, 2017
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. #InstallKeybdHook
  2. #SingleInstance force
  3.  
  4. h1 = Numpad1 ; sets hotkey names for 9 different 100 transitions
  5. h2 = Numpad2
  6. h3 = Numpad3
  7. h4 = Numpad4
  8. h5 = Numpad5
  9. h6 = Numpad6
  10. h7 = Numpad7
  11. h8 = Numpad8
  12. h9 = Numpad9
  13.  
  14. Hotkey, ^%h1%, transition ; defines the hotkeys
  15. Hotkey, ^%h2%, transition
  16. Hotkey, ^%h3%, transition
  17. Hotkey, ^%h4%, transition
  18. Hotkey, ^%h5%, transition
  19. Hotkey, ^%h6%, transition
  20. Hotkey, ^%h7%, transition
  21. Hotkey, ^%h8%, transition
  22. Hotkey, ^%h9%, transition
  23. Return ; end setup: above code always runs when script starts
  24.  
  25. Ctrl & [:: ; pincus
  26. Send, +[:+]^{Enter}
  27. Return
  28.  
  29. x:: ; submit count and paste
  30. Send, ^{Enter}
  31. Sleep, 50
  32. Send, ^v
  33. Return
  34.  
  35. z:: ; backspace to last space and paste
  36. Send, {Ctrl Down}{Backspace}v{Ctrl Up}
  37. Return
  38.  
  39. transition: ; common commands for all 100 transitions
  40. Send, ^{Enter}
  41. Sleep, 50
  42. StringTrimLeft, t, A_ThisHotkey, 7 ; not very elegant: trims name of numpad key pressed to get next 100 digit
  43. Send, ^v{Backspace}%t%{Ctrl down}ac{Ctrl up}{Right} ; changes copypasta
  44. Return
  45.  
  46. Ctrl & Numpad0:: ; backspace three times for k transitions
  47. Send, ^{Enter}
  48. Sleep, 50
  49. Send, ^v{Backspace 3}
  50. Return
  51.  
  52. Ctrl & NumpadDiv:: ; get and copypasta change
  53. Send, ,0{Ctrl Down}ac{Ctrl Up}{End}00{Ctrl Down}{Enter}v{Ctrl Up}
  54. Return
  55.  
  56. Ctrl & NumpadMult:: ; 001 and copypasta change
  57. Send, ,0{Ctrl Down}ac{Ctrl Up}{End}01{Space}congrats{Ctrl Down}{Enter}v{Ctrl Up}
  58. Return
  59.  
  60. NumpadAdd:: ; for fun: automatic "not found" and "jumbojet"
  61. Send, 04{Space}not{Space}found{Ctrl Down}{Enter}v{Ctrl Up} ; uncomment either line as necessary
  62. ;Send, 47{Space}jumbojet{Ctrl Down}{Enter}v{Ctrl Up}
  63. Return
  64.  
  65. ^End:: ; Suspend script/hotkey operation
  66. Suspend toggle
  67. Return
  68.  
  69. ; updated as of 10/16/2017
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement