Code: Select all
SendMode, Input
SetBatchLines -1
CoordMode, Mouse, Screen
mouseXY(x, y)
{
DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0)
}
strafe(left)
{
moveCount := 15
sleepInterval := 4
relativeMove := 55
if (left)
{
key := "d"
move := relativeMove
} else
{
key := "a"
move := -relativeMove
}
send {%key% down}
DllCall("Sleep", "UInt", 10)
Loop, %moveCount%
{
mouseXY(move, -(move/4))
DllCall("Sleep", "UInt", sleepInterval)
}
send {%key% up}
}
$Q::
while getkeystate("Q","P")
{
strafe(true)
strafe(false)
}
return
Hi I have this code but in the code the mouse moves diagonally, I want it to move on the horizontal axis, how can I do this?