Advertisement
Guest User

Untitled

a guest
Jul 18th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. #NoEnv
  2. SendMode, Input
  3. SetBatchLines -1
  4. CoordMode, Mouse, Screen
  5.  
  6.  
  7. mouseXY(x, y)
  8. {
  9. DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0)
  10. }
  11.  
  12. strafe(left)
  13. {
  14. moveCount := 35
  15. sleepInterval := 2
  16. relativeMove := 30
  17.  
  18. if (left)
  19. {
  20. key := "a"
  21. move := -relativeMove
  22. } else
  23. {
  24. key := "d"
  25. move := relativeMove
  26. }
  27. send {%key% down}
  28. DllCall("Sleep", "UInt", 5)
  29. Loop, %moveCount%
  30. {
  31. mouseXY(move, 0)
  32. DllCall("Sleep", "UInt", sleepInterval)
  33. }
  34. send {%key% up}
  35. }
  36.  
  37. alt:: Hotkey, $XButton1, Toggle
  38.  
  39. End::
  40. ExitApp
  41.  
  42. $XButton1::
  43. while getkeystate("XButton1","P")
  44. {
  45. strafe(false)
  46. strafe(true)
  47. }
  48. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement