Advertisement
Guest User

Untitled

a guest
Oct 16th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 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. #SingleInstance force
  7. drop = 35
  8.  
  9. MsgBox, Thank you for using InVains NoRecoil Hotkey! Be sure to donate to the cause!\
  10. MsgBox, Ctrl + Escape will terminate the script -- Ctrl + F1 will toggle the script
  11.  
  12. ^Escape:: ;Terminate script
  13. ExitApp
  14. return ;--
  15.  
  16. ^f1:: ;Toggles script on and off
  17. Suspend,Toggle
  18. return ;--
  19.  
  20. LButton:: ;Check if mouse button get's released immediately
  21. KeyWait, %A_ThisHotkey%, T0.15
  22. if (ErrorLevel = 1) {
  23. Click down ;Holding down left mouse
  24. Loop
  25. {
  26. CoordMode, Mouse, Screen ;Move mouse
  27. MouseMove, 0, drop, ,r ;--
  28.  
  29. Gosub, RandomSleep ;Trust me...sleep is good
  30.  
  31. If(GetKeyState("LButton","P")=0) ;If LButton is released break out of loop
  32. Break ;--
  33. }
  34.  
  35. KeyWait, %A_ThisHotkey%
  36. Click up ;--
  37. } else {
  38. Click ;Single click
  39. MouseMove, 0, drop, ,r ;--
  40. }
  41. return
  42.  
  43. RandomSleep:
  44. Random, random, 13, 24, 18
  45. Sleep %random%-5
  46. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement