Jump to content

MouseClick Command Duration


Recommended Posts

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.

Link to comment
Share on other sites

  • Moderators

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

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.

Link to comment
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".

Link to comment
Share on other sites

  • Moderators

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)

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.

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...