Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 1.24 KB | None | 0 0
  1. #RequireAdmin
  2.  
  3. #cs
  4.  usage:
  5.     script clicks on point A, waits, clicks on point B, waits, repeat
  6.     keys:
  7.         alt+1: saves position the mouse is currently at as point A
  8.         alt+2: saves position the mouse is currently at as point B
  9.         alt+3: toggle clicking on/off
  10.     if your mouse is clicking in the top left corner of the screen, it means you didnt set the positions
  11. #ce
  12.  
  13. HotKeySet("!1", "SetPointOne")
  14. HotKeySet("!2", "SetPointTwo")
  15. HotKeySet("!3", "Toggle")
  16.  
  17. Dim $active = false
  18. Dim $pointOne[2] = [0, 0]
  19. Dim $pointTwo[2] = [0, 0]
  20. Dim $clickDelay = 1000 ; delay before/after clicks - super fast clicks tend to trigger bot checks, so tweak the value lower if needed but be sensible
  21. Dim $mouseSpeed = 50 ; speed of the mouse moving - same deal as click delay, lower = faster (0-100), but be sensible. would not go lower than 15-20
  22.  
  23. Func SetPointOne()
  24.     $pointOne = MouseGetPos()
  25. EndFunc
  26.  
  27. Func SetPointTwo()
  28.     $pointTwo = MouseGetPos()
  29. EndFunc
  30.  
  31. Func Toggle()
  32.     $active = Not $active
  33. EndFunc
  34.  
  35. While(1)
  36.     If $active Then
  37.         MouseClick("left", $pointOne[0], $pointOne[1], 1, 50)
  38.         Sleep($clickDelay) ;1 second - might want a higher delay time
  39.         MouseClick("left", $pointTwo[0], $pointTwo[1], 1, 50)
  40.         Sleep($clickDelay)
  41.     Else
  42.         Sleep(10)
  43.     EndIf
  44. WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement