|
Post by bobmaucher on Aug 27, 2021 16:08:48 GMT
Hi,
I'm trying to make a macro that looks for an image on the screen, and when it sees the image, it left-clicks it.
Here is my code:
1 | IF | DETECT IMAGE | image path C:\Users\bobma\Desktop\RipeSunflower.png::match quick::move mouse no::save to vars X Y | IMAGE FOUND | CONTINUE
2 | RUN ACTION | MOUSE CLICK | Left click at %X% %Y%
3 | RUN ACTION | WAIT SECONDS | 1
4 | RUN ACTION | MOUSE CLICK | Left click at %X% %Y%
5 | IF | END IF
6 | RUN ACTION | WAIT SECONDS | 1 I'm getting this error:
Playback error: 2 | RUN ACTION | MOUSE CLICK | Left click at %X% %Y% - Condition execution error Conversion from string "%x%" to type 'Integer' is not valid.
I can't figure out how to make sure the X and Y variables are defined as integers - it seems the program is setting them as strings, and then tries to interpret the strings as integers when it's getting direction where to click. What am I doing wrong?
Thank you
|
|
|
Post by philranger on Aug 28, 2021 13:59:54 GMT
Hello,
I know that mmm is quite strict about spacing, I never tried to put spaces at the beginning of lines and can't check now, but worth a try. Also, my clicks are never "run actions" .
Maybe something more like this?
2 | %INTEGER1% | %INTEGER2% | 100 | Left Click
Regards
|
|
|
Post by Steve on Aug 29, 2021 22:03:05 GMT
Playback error: 2 | RUN ACTION | MOUSE CLICK | Left click at %X% %Y% - Condition execution error Conversion from string "%x%" to type 'Integer' is not valid. I can't figure out how to make sure the X and Y variables are defined as integers - it seems the program is setting them as strings, and then tries to interpret the strings as integers when it's getting direction where to click. What am I doing wrong? Thank you This was an error with version 8.3.1.0. It was patched a couple of weeks ago. Update to the latest version.
|
|
|
Post by bobmaucher on Aug 30, 2021 11:26:06 GMT
Upgrading was my problem - thank you!
|
|
|
Post by mrclicker on Sept 1, 2021 11:37:43 GMT
i had a similar issue where, after the upgrade to 8.3.2.1, previously made macros where variable were defined as integers failed in an IF statement when comapring them to another integer i got an error saying it is a string and not an integer
|
|