# Inaccurate mouseclicking

## Recommended Posts

Hey guys!

Im new when it comes to scripting and i follow some videos on how to make clicks and such. So i will say i know the basics alrady.

However, im having a really big problem

When i run the script is works fine with the clicks and all. But if i run it one or two more times it just moves to very inaccurate positions. YES, i have tried mulitple times to change positions and such but no luck. My script is working its just so inaccurate that im unable to use it. Are there any solution for this?

I have also set the camera to a specific position. I have also tried other camera angles, no luck there either. Making more smoother macro movements does not seem to work aswell.

I have also tried to have clicks away from the minimap, since i know some youtuber had problem with inaccuracy because of this.

I came here because i was googling and did not see anyone else having this problem, or mentioning it. So if someone have a solution, i would be happy!! All i have seen are people trying to change the resolution. But it has nothing to do with that. I heard someone mention controlmouseclick. However are there any differences? I have also A window selection in my script so it changes to the window the macro will be running in. Resolution is not changing or anything. I have also tried other macros and same problem there.

Also does anyone know or can teach me how pixel search works? I want the macro to be able to click at the correct character instead of waiting for the character to get in the position its searching for.

Edited by xgjengen

##### Share on other sites

@xgjengen, It seems you haven't bothered to follow this simple request for reading the forum rules.

I am giving you 2 days during which youcan't post in our forums and you can spend studying these Forum Rules.
Don't bother returning in case you intent to continue asking question on this topic.

Jos

Edited by Jos

Live for the present,
Dream of the future,
Learn from the past.

##### Share on other sites
This topic is now closed to further replies.

• ### Similar Content

• Hi All,
I am trying to login into our application using AutoIT. When I launch the application a splash screen appears and the login screen goes behind it. At this point the script pauses and I loose control of everything. I have literally tried everything for the past two days but nothing has worked yet. Any suggestions would be appreciated.
RunWait("\\mchsv411.siplaceworld.net\splmshare\int00\conf\start_apps\windows\start_nx110.bat en portal_client int00 tc112", "", @SW_MAXIMIZE)
AutoItSetOption("SendKeyDelay", 200)
Local $hWnd = WinWaitActive("Teamcenter Login") MouseClick("left", @DesktopWidth / 2, @DesktopHeight / 2) The splash screen has title "Teamcenter" and is static. I tried to click on the center to get control of login window. I have tried WinActivate, WinSetState, ControlCommand and a lot of other things. • By lonardd Hi, I have a very strange problem concerning MouseClick function. I need to start Control Panel, navigate it on the Display Section (Adjust screen resolution link), click on it, and from the next Dialog choose Intel Graphic tool tab and navigate into it when it opens. I wasn't using MouseClick() at first when I tried to use Control IDs, but I was fed up with the Autoit Window Info poor and inaccurate info (It flickers and the moment I click on the control the control ID and class disappear) so I ended up choosing the easiest way. The code I'm posting worked OK until two weeks ago, the mouse clicks were accurately performed and the Script reached the end with no errors...and I was happy. All of a sudden, between one try and the other, I noticed the cursor not flying exactly where it was supposed to, namely to the Control Panel ->Display->Adjust screen resolution link but it clicked some 30 pixels below and some 30 pixels to the left, choosing obviously and undesired function and from that point it screwed the whole thing up. And from that moment onward, it seems I can no longer regain the mouse to click on that sequence. Could it be because my Control Panel ->Display form moved slightly from one test to another and therefore I got that small offside? If you believe this is the reason, I should then re position the Control Panel ->Display window to 0,0 and recalculate all the clicks. do you have a suggestion? Thanks a lot Dave RotateDisplays.au3 • By c1one Something simple enough, and I am sure it's an oversight, but I have not been able to track this down. The entire script is attached, but here is the point of failure. Note: I am getting the "Error: subscript used on non-accessible variable" but I thought the initial line of: AutoItSetOption('MouseCoordMode', 0) Should address that issue? <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ; Install updates (minimized and updating for many minutes) ; Updates Not Installed Screen ; Wait for updates to complete WinWait("ProSeries Update") ; Wait just over 9 minutes to ensure popup is ready (test alternative to WinWait) Sleep(550000) ; Set focus on Product Licenses window WinActivate("ProSeries Update") ; Send Mouse Click to Install Now button MouseClick ( "left" [, 581, 362 [, clicks = 1 [, speed = 10]]] ) ; end Installing Updates screen >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Thanks for any insights! c1one ProSeries2017_No_Customer_Info.au3 • By dadalt Hi! I have a button where I need to close it! I was doing through clicking same position in screen but there are some id's that have different sizes. What are the possible ways to click this closable button? Is there a way to close it through id? Is there a way to get it's position through it's ID? Thanks in advance! • Hello I got this script works below and I want to do not move cursor on screen when action is performed. Opt("MouseCoordMode", 1) ; cause it gets whole screen coords Local$x, $y Local$search = _ImageSearch('item.bmp', 0, $x,$y, 0) If $search = 1 Then MouseMove($x, $y,0) MouseClick("right",$x, $y)) MouseMove($xMiddle, $yMiddle,0) MouseClick("left",$xMiddle, $yMiddle) EndIf I changed this above to this below and what happen is. It clicks right button and then left button but not move mouse to$x $y and then to$xMiddle $yMiddle. Opt("MouseCoordMode", 1) ; cause it gets whole screen coords Local$x, $y Local$search = _ImageSearch('item.bmp', 0, $x,$y, 0) If $search = 1 Then ControlClick("","",0,"secondary",1,$x,$y) ControlClick("","",0,"primary",1,$xMiddle,$yMiddle) EndIf If needed I got handle in var$hwnd
Please tell me how parameters in ControlClick would like be
×

• Wiki

• Back

• #### Beta

• Git
• FAQ
• Our Picks
×
• Create New...