Sign in to follow this  
Followers 0
weasel127

MouseClick Command Duration

9 posts in this topic

Is there a way to "hold" the mouse key down (for left and right click) for a certain duration of time? The normal LeftClick/RightClick commands don't work on some programs that I use because the duration of the click is too short with just the mouseclick("left") command.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Is there a way to "hold" the mouse key down (for left and right click) for a certain duration of time? The normal LeftClick/RightClick commands don't work on some programs that I use because the duration of the click is too short with just the mouseclick("left") command.

MouseDown('Left')
Sleep(1000); replace 1000 with how long of a duration
MouseUp('Left')
Help file has all of that :o Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Sure thing. I looked in the helpfile, something you should have done, and found this definition of MouseDown:

Perform a mouse down event at the current mouse position.

Syntax: MouseDown ( "button" )

Parameters

"button" - The button to click: "left", "right", "middle", "main", "menu", "primary", "secondary".

Share this post


Link to post
Share on other sites

Oh, sorry. I just started this program awhile ago and I'm still a newbie at this ^^";; . Next time I'll check help files first before posting here. Thanks for the advice!

Share this post


Link to post
Share on other sites

Good choice - the helpfile is a handy resource.

Share this post


Link to post
Share on other sites

Did you search mouseclickdelay in the help? :o

Share this post


Link to post
Share on other sites

Did you search mouseclickdelay in the help? :o

I think he's looking to hold the button down longer... Not time between clicks themselves... I guess then MouseClickDownDelay would have been a good option too. (I could be wrong about what he wants specifically)

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

I think he's looking to hold the button down longer... Not time between clicks themselves... I guess then MouseClickDownDelay would have been a good option too. (I could be wrong about what he wants specifically)

I was expecting he can read the help and the other options around the same subject.

I am always "fighting" (educating) those who does not use the help file and ask question first.

Sometime the help file is not perfect but reading inside is always good. :o

Share this post


Link to post
Share on other sites

u know sum1 should really spam every forum, creating thousands of threads with the link to the help file, just like a function per thread, you know it could solve the problem :o

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