While I am running a script i want to add something that disables physical mouse movement so that the script is more accurate with its movements. Is this possible?
Also is there something I can add so that if i press a certain key at any time while it is running it will cancel the script immediately and re enable physical mouse movement
This is the script I have
if (event == "G_PRESSED" and arg == 4 and GetMKeyState("kb") == 3) then
MoveMouseTo( 36165, 57821)
Sleep(100)
PressMouseButton(3)
ReleaseMouseButton(3)
Sleep(100)
MoveMouseTo( 36131, 59461)
Sleep(100)
PressKey ("lalt")
Sleep(100)
PressKey ("X")
Sleep(100)
ReleaseKey ("lalt")
ReleaseKey ("X")
PressMouseButton(1)
ReleaseMouseButton(1)
Sleep(250)
MoveMouseTo( 38932, 56060)
Sleep(2000)
PressMouseButton(1)
ReleaseMouseButton(1)
MoveMouseTo( 4166, 1518)
Sleep(200)
PressMouseButton(1)
ReleaseMouseButton(1)
MoveMouseTo( 38932, 56060)
Sleep(100)
PressMouseButton(3)
ReleaseMouseButton(3)
Sleep(100)
MoveMouseTo( 38590, 57882)
Sleep(100)
PressKey ("lalt")
Sleep(100)
PressKey ("X")
Sleep(100)
ReleaseKey ("lalt")
ReleaseKey ("X")
end
Thanks
LGS/GHUB is unable to disable physical mouse movement.
To make mouse moves more accurate you can reduce sleep intervals after MoveMouseTo
from 100ms to 10ms. This way a human would have only 10ms to move the mouse cursor away before mouse button click is simulated.
MoveMouseTo( 38932, 56060)
Sleep(100)
MoveMouseTo( 38932, 56060)
Sleep(10)
PressMouseButton(3)