Sign in to follow this  
Followers 0
doug4117

Quicker mouse move/click?

5 posts in this topic

I want to click a button on the screen when the user presses a key. The code I've written, using either MouseMove or MouseClick, works great, but the click isn't instantaneous. The mouse pointer moves visibly across the screen. When it reaches the destination it performs the click, of course, but I want to speed things up. I want the click to occur without having to wait for the mouse pointer to get to the click location (which is just a visual convention anyway). Is there something I'm missing, or is this not possible? I would have thought that MouseClick would be instantaneous, but it behaves exactly like MouseMove.

The code I use, not that anyone really needs to see it, is below. Thanks!

MouseMove(51,318)
MouseDown("left")
MouseUp("left")

MouseClick("left", 30, 184)

Share this post


Link to post
Share on other sites



If you read the helpfile about MouseClick you will see that there is an option for speed with 0 being instant.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

HI,

also might have a look at Opt --> MouseClickDelay

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Thanks, I looked in the help a number of times but apparently I didn't notice the speed option, or misunderstood its purpose. Strange, but using MouseClick with a speed of zero didn't work. Nothing appeared to happen...the movement didn't seem to happen. However, the MouseMove set to speed one works great. Thanks.

Share this post


Link to post
Share on other sites

Thanks, I looked in the help a number of times but apparently I didn't notice the speed option, or misunderstood its purpose. Strange, but using MouseClick with a speed of zero didn't work. Nothing appeared to happen...the movement didn't seem to happen. However, the MouseMove set to speed one works great. Thanks.

Yes, MouseClick set to zero happens INSTANTLY, as in there is no movement, its just there

One, it just moves there fast

Share this post


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
Sign in to follow this  
Followers 0