Sign in to follow this  
Followers 0
lucius100

How to click 1 times only instead of 2 times ?

4 posts in this topic




#2 ·  Posted (edited)

How are you determining it's clicking twice?  Are you in a loop with that code?  Do you have it more than once in your code?

To be honest, that code wouldn't run at all with the way you have it.

Anyway...

I suspect it's one of the conditions above I've described that is your real issue, but you can try:

MouseMove(parameters here)

MouseDown(parameters here)

MouseUp(parameters here)

Edit:

The 4th parameter, as stated in the help file, is the number of clicks, you have 10 in that position.  Just put 1 if you're not using the 5th parameter which is speed.

Edited by SmOke_N
1 person likes this

[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

#3 ·  Posted (edited)

The help says:

MouseClick ( "button" [, x, y [, clicks = 1 [, speed = 10]]] )

You're using 10 as the fourth argument, so your code will try to click 10 times.

Try:

MouseClick ("primary", x, y, 1, 10)

Good luck.

(Read the help file for MouseClick() to see why I wrote "primary" instead of "left".)

/edit: and of course, replace x and y by numbers or by variables.

Edited by SadBunny

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites

How are you determining it's clicking twice?  Are you in a loop with that code?  Do you have it more than once in your code?

To be honest, that code wouldn't run at all with the way you have it.

Anyway...

I suspect it's one of the conditions above I've described that is your real issue, but you can try:

MouseMove(parameters here)

MouseDown(parameters here)

MouseUp(parameters here)

Edit:

The 4th parameter, as stated in the help file, is the number of clicks, you have 10 in that position.  Just put 1 if you're not using the 5th parameter which is speed.

 

oh , I intend to put 10 as the speed, never think it would replace it with click  :thumbsup:

 

The help says:

MouseClick ( "button" [, x, y [, clicks = 1 [, speed = 10]]] )

You're using 10 as the fourth argument, so your code will try to click 10 times.

Try:

MouseClick ("primary", x, y, 1, 10)

Good luck.

(Read the help file for MouseClick() to see why I wrote "primary" instead of "left".)

/edit: and of course, replace x and y by numbers or by variables.

yes, I just write x and y since everybody monitor is not the same  :sorcerer:

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