Advertisement
Guest User

sprintkey

a guest
Jan 25th, 2020
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.33 KB | None | 0 0
  1. #NoEnv
  2. #MaxHotkeysPerInterval 99000000
  3. #HotkeyInterval 99000000
  4. #InstallKeybdHook
  5. #InstallMouseHook
  6. #KeyHistory 5
  7. SetTitleMatchMode, 1
  8. ListLines Off
  9. Process, Priority, , A
  10. SetBatchLines, -1
  11. SetKeyDelay, -1, -1
  12. SetMouseDelay, -1
  13. SetDefaultMouseSpeed, 0
  14. SetWinDelay, -1
  15. SetControlDelay, -1
  16. SendMode Input
  17. #IfWinActive, Xero Client
  18.  
  19. isChatting := 0
  20. isWhisper := 0
  21. exitWhisper := 0
  22.  
  23. rButtonPressed := 0
  24.  
  25. isTimerRunning := 0
  26. wInputs := 0
  27.  
  28. Hotkey, *Capslock, SprintKey
  29.  
  30. Enable()
  31. {
  32. Hotkey, *Capslock, SprintKey, On
  33. }
  34.  
  35. Disable()
  36. {
  37. Hotkey, *Capslock, SprintKey, Off
  38. }
  39.  
  40. {
  41. wPressed:
  42. isTimerRunning = 0
  43. SetTimer,wPressed, Off
  44. wInputs = 0
  45.  
  46. return
  47. }
  48.  
  49. $*W::
  50. if wInputs >= 4
  51. {
  52. wInputs = 0
  53. isTimerRunning = 0
  54. SetTimer,wPressed, 2
  55. }
  56. else
  57. {
  58.  
  59. }
  60.  
  61. SendInput, {w down}
  62. wInputs +=1
  63. if isTimerRunning = 1
  64. {
  65.  
  66. }
  67. else
  68. {
  69. isTimerRunning = 1
  70. SetTimer,wPressed,500
  71. }
  72. DllCall("Sleep",UInt,5)
  73. ;KeyWait, W
  74. ;SendInput, {w up}
  75. return
  76.  
  77. *~W up::
  78. SendInput, {w up}
  79. return
  80.  
  81.  
  82. SprintKey:
  83. if wInputs >= 4
  84. {
  85. wInputs = 0
  86. isTimerRunning = 0
  87. SetTimer,wPressed, 2
  88. }
  89. else
  90. {
  91.  
  92. }
  93. if isTimerRunning = 1
  94. {
  95. if getkeystate("w", "p")
  96. {
  97. SendInput, {w up}
  98. DllCall("Sleep",UInt,10)
  99. }
  100. else
  101. {
  102.  
  103. }
  104. SendInput, {w down}
  105. wInputs +=1
  106. DllCall("Sleep",UInt,5)
  107. if getkeystate("w", "p")
  108. {
  109.  
  110. }
  111. else
  112. {
  113. SendInput, {w up}
  114. }
  115. }
  116. else
  117. {
  118. if getkeystate("w", "p")
  119. {
  120. SendInput, {w up}
  121. DllCall("Sleep",UInt,10)
  122. }
  123. else
  124. {
  125.  
  126. }
  127. SendInput, {w down}
  128. wInputs +=1
  129. isTimerRunning = 1
  130. SetTimer,wPressed,490
  131. DllCall("Sleep",UInt,5)
  132. SendInput, {w up}
  133. DllCall("Sleep",UInt,5)
  134. SendInput, {w down}
  135. wInputs +=1
  136. DllCall("Sleep",UInt,5)
  137. if getkeystate("w", "p")
  138. {
  139.  
  140. }
  141. else
  142. {
  143. SendInput, {w up}
  144. }
  145. }
  146. KeyWait, Capslock
  147. return
  148.  
  149. *~Rbutton::
  150. Enable()
  151. SetCapsLockState, Off
  152. isChatting = 0
  153. isWhisper = 0
  154.  
  155. return
  156.  
  157. *~Lbutton::
  158. Enable()
  159. SetCapsLockState, Off
  160. isChatting = 0
  161. isWhisper = 0
  162.  
  163. return
  164.  
  165. *~F1::
  166. isChatting = 1
  167. isWhisper = 1
  168. Disable()
  169.  
  170. return
  171.  
  172. *~F2::
  173. isChatting = 1
  174. isWhisper = 0
  175. Disable()
  176.  
  177. return
  178.  
  179. *~F3::
  180. isChatting = 1
  181. isWhisper = 0
  182. Disable()
  183.  
  184. return
  185.  
  186. *~F4::
  187. isChatting = 1
  188. isWhisper = 0
  189. Disable()
  190.  
  191. return
  192.  
  193. $*Enter::
  194. if (A_PriorKey = "F1")
  195. {
  196. Enable()
  197. isWhisper = 0
  198. isChatting = 0
  199. }
  200. else
  201. {
  202. if isChatting = 1
  203. {
  204. if isWhisper = 1
  205. {
  206. if (A_PriorKey = "Enter")
  207. {
  208. isWhisper = 0
  209. isChatting = 0
  210. Enable()
  211. }
  212. else
  213. {
  214. isChatting = 1
  215. }
  216. }
  217. else
  218. {
  219. isWhisper = 0
  220. isChatting = 0
  221. Enable()
  222. }
  223. }
  224. else
  225. {
  226. isChatting = 1
  227. Disable()
  228. }
  229. }
  230. SendInput, {Enter down}
  231. DllCall("Sleep",UInt,5)
  232. SendInput, {Enter up}
  233. DllCall("Sleep",UInt,1)
  234.  
  235. return
  236.  
  237. *~Esc::
  238. Enable()
  239. isChatting = 0
  240.  
  241. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement