Advertisement
Guest User

Untitled

a guest
Oct 13th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 1.11 KB | None | 0 0
  1. ; Script to perform a 360 over a series of mouse inputs (takes some times to run, not intended for use in play)
  2.  
  3. HotKeySet("{INS}", "TestMouse")
  4.  
  5. While 1
  6.     Sleep(1000)
  7. WEnd
  8.  
  9.  
  10. Func TestMouse()
  11.    $partition = 900 ; how many movements to perform in a single go.  Don't let this exceed half of your resolution.
  12.    $delay = 50 ; delay in milliseconds between movements.  Making this too low is prone to causing dropped inputs.
  13.  
  14. ;   $totalcount = 14239 ; perfect 360 in OW at 3.83
  15. ;   $totalcount = 37471 ; perfect 360 in OW at 3.83 sens scoped with 38 sens multiplier
  16.    $totalcount = 14227 ; perfect 360 in quake/source at 1.15
  17.  
  18.  
  19.    While $totalcount > $partition
  20.       _MouseMovePlus($partition,0)
  21.       $totalcount = $totalcount - $partition
  22.       Sleep($delay)
  23.    WEnd
  24.   _MouseMovePlus($totalcount,0) ; and do the leftover
  25.  
  26. EndFunc
  27.  
  28. Func _MouseMovePlus($X = "", $Y = "")
  29.         Local $MOUSEEVENTF_MOVE = 0x1
  30.     DllCall("user32.dll", "none", "mouse_event", _
  31.             "long",  $MOUSEEVENTF_MOVE, _
  32.             "long",  $X, _
  33.             "long",  $Y, _
  34.             "long",  0, _
  35.         "long",  0)
  36. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement