Jump to content

Question about MouseClick function


Recommended Posts

Hi there,

Sorry if I am posting this in the wrong section, but Im having problem understanding this.

 

I want the mouse to click at some cords, twice but I want to set the speed between each click, I did google and I am not sure if I got it right..

MouseClick("left", 903, 453, 2, 20)
Sleep(100)

 

Is this right? also I also wanted another function to left click and hold for 3 or 5 seconds then release but I couldn't find anything good.

At the moment I am using a workaround this: 

MouseMove(1729, 914) ; Move the mouse cursor to that position
Sleep(1000)
MouseDown("left")
Sleep(4000) 
MouseUp("left")
Sleep(1000)

 

I hope someone can help me to confirm if the first function is correct and to let me know if there is another way to make it click and hold then release after some seconds.

 

Regards

Link to comment
Share on other sites

What is the application you are trying to automate ?  Can you tell us what exactly you want to achieve ?

I am pretty sure there is a better solution than those mouse* functions?

Link to comment
Share on other sites

2 hours ago, Nine said:

What is the application you are trying to automate ?  Can you tell us what exactly you want to achieve ?

I am pretty sure there is a better solution than those mouse* functions?

I am trying to create a macro with multiple functions, iv done most of it  but there is 1 step where it requires me to click a button at certain cords and hold it for 3 seconds so I wanted to replicate that function.

Also sometimes I wanted to understand  how to manipulate the speed between each click, in case its doble click or more than 2 clicks.

 

Regards

Link to comment
Share on other sites

On 8/6/2019 at 1:58 AM, jaxclain said:

I want the mouse to click at some cords, twice but I want to set the speed between each click, I did google and I am not sure if I got it right..

MouseClick("left", 903, 453, 2, 20)
Sleep(100)

 

MouseClick("left", 903, 453)
Sleep(3000) ; wait 3 seconds
MouseClick("left", 903, 453)

 

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...