need some help figuring out how this works, I have a mouse_event set to move the cursor in a certain direction. it's looping to create a smoothness imitation, without sleep the loop takes 0 ms to complete, but for some reason with sleep only set to 1 ms loop takes 281 ms to complete, to put this into perspective heres the code:
Code: Select all
#NoEnv
MS := A_TickCount
x = 0
loop {
x += 10
DllCall("mouse_event",uint,1,int, 70 ,int, 0,uint,0,int,0)
if (x > 180) {
break
}
sleep 1
}
time := A_TickCount - MS
Msgbox % time