Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv
- SendMode, Input
- SetBatchLines -1
- CoordMode, Mouse, Screen
- ; Note: remove ; on BlockInputs if you want to prevent user mouse movements while using hotkeys.
- mouseXY(x, y)
- {
- DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0)
- }
- strafe(left)
- {
- moveCount := 10
- sleepInterval := 2
- relativeMove := 15
- if (left)
- {
- key := "p"
- move := -relativeMove
- }
- else
- {
- key := "o"
- move := relativeMove
- }
- send {%key% down}
- DllCall("Sleep", "UInt", 5)
- Loop, %moveCount%
- {
- mouseXY(move, 0)
- DllCall("Sleep", "UInt", sleepInterval)
- }
- send {%key% up}
- }
- $XButton2::
- while getkeystate("XButton2","P")
- {
- strafe(false)
- strafe(true)
- }
- return
Add Comment
Please, Sign In to add comment