Jump to content

How to MouseMove many times VERY QUICKLY

Recommended Posts

It seems that MouseMove has a delay between each MouseMove call.

I'm aware of the speed parameter, which has been set to 0, so movement is instant.

However even if I call MouseMove repeatedly within a While-loop, there seems to be a significant delay between each call.

How can I reduce this delay?

; An example:
For $x = 0 To 100
    For $y = 0 To 100
        MouseMove($x, $y, 0)

I'd like for the above code to scan over the 100x100 pixel area in a matter of a couple seconds.

Currently it takes many many many minutes.

Edited by joncom
Link to post
Share on other sites

Figured it out. For anybody else interested, this does the trick!

AutoItSetOption ( "WinWaitDelay", 10 )

WinWaitDelay Alters how long a script should briefly pause after a successful window-related operation.

Time in milliseconds to pause (default=250).

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By TatsuJiN
      Hello. Is it possible to set the mouse move speed to a value between 1 and 2? 
      MouseMove(x, y, 1) is too quick but MouseMove(x, y, 2) is a bit too slow.
      My son is playing a single player fishing game and he asked me for help. The faster the mouse cursor moves when casting his "fishing line", the further the fishing line goes. When MouseMove(x, y, 2)  is used, my son is able to move his cursor faster than autoit can. When MouseMove(x, y, 1) is used, the mouse cursor moves too quickly, and the game does not register the mouse move action. I would like to find that "sweet spot" where the mouse moves as quickly as possible, but slow enough to where the game can register that speed.
      I'd love to introduce my son to the power of scripting/programming to further peak his interest in it. Video games can act as a fun platform to do just that.
  • Create New...