SHARE
TWEET

holdtoclick.au3

Xyberviri Oct 18th, 2019 (edited) 239 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; Have a game that requires you to click a bunch? hold left mouse button to click while this is enabled.
  2. ; Shift+pause to terminate the script, pause key to pause it... no more RIP LMB
  3. Global $Paused
  4. HotKeySet("{PAUSE}", "TogglePause")
  5. HotKeySet("+{PAUSE}", "Terminate")
  6.  
  7. #Include <Misc.au3>
  8. While 1
  9. $end = 1
  10.  
  11. while _IsPressed(01)
  12. ;dont use the middle mouse button? change this to 04 from 01 and swap the down/up commands below and then you can use the middle button to click lmb
  13. mousedown("left")
  14. mouseup("left")
  15. sleep(100)
  16. tooltip("clicking",0,0)
  17.     wend
  18.   tooltip("",0,0)
  19. WEnd
  20.  
  21. Func TogglePause()
  22.   $Paused = NOT $Paused
  23.   While $Paused
  24.     sleep(100)
  25.     ToolTip('Script is "Paused"',0,0)
  26.   WEnd
  27.   ToolTip("")
  28. EndFunc
  29.  
  30. Func Terminate()
  31.     Exit 0
  32. EndFunc
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top