Hold left MouseClick for fixed time length

Script Request

Greetings (sorry for my bad english below),

i am trying to write a script for a game called IdleOn. The script should hold the left mouse button for a fixed time length (in ms). The script i coded works perfectly fine. But in the game it is important to have this fixed times. So i am trying to reduce the error-tolerance of the command Sleep. Any ideas how to improve my script to get more accuracy ?

​

^1::
Click d
Sleep, 300
Click u
return

^q::
Click d
Sleep, 359
Click u
return

^2::
Click d
Sleep, 420
Click u
return

^w::
Click d
Sleep, 480
Click u
return

^3::
Click d
Sleep, 520
Click u
return

^e::
Click d
Sleep, 580
Click u
return

^4::
Click d
Sleep, 620
Click u
return

^r::
Click d
Sleep, 660
Click u
return

^5::
Click d
Sleep, 710
Click u
return

^t::
Click d
Sleep, 740
Click u
return

^6::
Click d
Sleep, 790
Click u
return

^z::
Click d
Sleep, 820
Click u
return

^7::
Click d
Sleep, 840
Click u
return

Posted Jan 4, 2023, 6:16 PM UTC

02
Loading comments…