rdob
New Member
Posts: 4
|
Post by rdob on Jul 17, 2023 22:56:28 GMT
The macro I have below seems to work ok but it appears to click its current location then move and click again at a new location. How can i fix this?
1 | IF | DETECT IMAGE | image path C:\my-dir\accept.bmp::at 778 125 475 918::match quick::move mouse no::save to vars XPOS YPOS | IMAGE FOUND | MOUSE CLICK | Left click at %XPOS% %YPOS% 1 times with 0 ms delay 2 | IF | DETECT IMAGE | image path C:\my-dir\move.bmp::at 1168 328 53 40::match quick::move mouse no::save to vars XPOS YPOS | IMAGE FOUND | MOUSE CLICK | Left click at %XPOS% %YPOS% 1 times with 0 ms delay 3 | IF | DETECT IMAGE | image path C:\my-dir\left.bmp::at 773 119 352 803::match quick::move mouse no::save to vars XPOS YPOS | IMAGE FOUND | MOUSE CLICK | Left click at %XPOS% %YPOS% 1 times with 0 ms delay 4 | IF | DETECT IMAGE | image path C:\my-dir\right.bmp::at 775 40 484 1001::match quick::move mouse no::save to vars XPOS YPOS | IMAGE FOUND | MOUSE CLICK | Left click at %XPOS% %YPOS% 1 times with 0 ms delay
|
|
rdob
New Member
Posts: 4
|
Post by rdob on Jul 19, 2023 22:00:44 GMT
So I think what is happening is that as it loops the condition remains true until another condition is true. So if line 1 was true it will click until another becomes true even though condition one is no longer true. Any ideas on how to fix this?
|
|
|
Post by philranger on Jul 23, 2023 18:24:28 GMT
Hello,
Maybe add a delay at the end so the picture has time to disappear?
|
|
rdob
New Member
Posts: 4
|
Post by rdob on Jul 25, 2023 22:37:19 GMT
I found the issue. But have run into new ones. I had more lines like this and one was IMAGE NOT FOUND rather than IMAGE FOUND so that was running all the time, creating my problem. Ill make another post about the current issue.
|
|