Jump to content

How to click 1 times only instead of 2 times ?


Go to solution Solved by SmOke_N,

Recommended Posts

  • Moderators
  • Solution
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

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.

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.

Posted

  On 2/10/2015 at 7:09 AM, SmOke_N said:

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:

 

  On 2/10/2015 at 7:10 AM, SadBunny said:

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:

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
  • Recently Browsing   0 members

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