Code: Select all
$MButton::
while getkeystate("MButton","P")
{
strafe(true)
strafe(false)
}
return
Code: Select all
mouseXY(x, y)
{
DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0)
}
strafe(left)
{
moveCount := 1
sleepInterval = 1
relativeMove := 3000
if (left)
{
key := ""
move := relativeMove
} else
{
key := ""
move := -relativeMove
}
send {%key% down}
DllCall("Sleep", "UInt", 5)
Loop, %moveCount%
{
mouseXY(move, -(move/4))
DllCall("Sleep", "UInt", sleepInterval)
}
send {%key% up}
}
$MButton::
while getkeystate("MButton","P")
{
strafe(true)
strafe(false)
}
return