Code: Select all
move_5px:
MouseGetPos, xpos, ypos
MouseMove, -5, 0, 10, R
Sleep, 100
MouseMove, xpos, ypos
Return
Code: Select all
move_5px:
MouseGetPos, xpos, ypos
MouseMove, -5, 0, 10, R
Sleep, 100
MouseMove, xpos, ypos
Return
Code: Select all
Gosub, move_5px
Return
move_5px:
CoordMode, Mouse
MouseGetPos, x1, y1
MouseMove, -5, 0, 10, R
Sleep, 100
MouseMove, x1, y1
MouseGetPos, x2, y2
MsgBox, 64, Coordinates, Old: (%x1%,%y1%)`nNew: (%x2%,%y2%)
Return
Thank you very much, can I prevent that or I must buy new mouse?mikeyww wrote: ↑26 Sep 2021, 06:57If the mouse moves further due to a manual move, then the coordinates may change. Some mouse devices are unstable and do generate moves with the smallest of vibrations.Code: Select all
Gosub, move_5px Return move_5px: CoordMode, Mouse MouseGetPos, x1, y1 MouseMove, -5, 0, 10, R Sleep, 100 MouseMove, x1, y1 MouseGetPos, x2, y2 MsgBox, 64, Coordinates, Old: (%x1%,%y1%)`nNew: (%x2%,%y2%) Return
Also, in the game I must use this -
Code: Select all
DllCall("mouse_event", uint, 1, int, -10, int, 0), ahk_id %id%
Code: Select all
ControlSend, , {w down}, ahk_id %id%
Sleep, % rnd(35000, 65000)
ControlSend, , {d down}, ahk_id %id%
Sleep, % rnd(250, 600)
Users browsing this forum: No registered users and 351 guests