lucius100 Posted February 10, 2015 Share Posted February 10, 2015 MouseClick ("Left", x, y, 10) I am using this code, and it click twice at the targeted position. I am looking at the parameter options but it doesn't give me that option https://www.autoitscript.com/autoit3/docs/functions/MouseClick.htm I want to click 1 time only at the targeted position Link to comment Share on other sites More sharing options...
Moderators Solution SmOke_N Posted February 10, 2015 Moderators Solution Share Posted February 10, 2015 (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 February 10, 2015 by SmOke_N lucius100 1 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 More sharing options...
SadBunny Posted February 10, 2015 Share Posted February 10, 2015 (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 February 10, 2015 by SadBunny Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
lucius100 Posted February 10, 2015 Author Share Posted February 10, 2015 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 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now