|
Post by lordgabb on Nov 7, 2018 18:23:49 GMT
Hello,
The main idea is to detect if a pixel changes color to press 2 buttons and return to the loop. If the pixel didnt change, check another pixel and do a similar task:
1 | IF | PIXEL COLOR | Color [R=13, G=164, B=255]::At Location [X:140 Y:275] | IS NOT THE SAME | GOTO MACRO LINE | 3 | ELSE | 1 | RUN ACTION | GOTO MACRO LINE | 2 2 | IF | PIXEL COLOR | Color [R=45, G=45, B=200]::At Location [X:180 Y:200] | IS NOT THE SAME | GOTO MACRO LINE | 6 | ELSE | 2 | RUN ACTION | GOTO MACRO LINE | 1 3 | 200 | 200 | 0 | Keypress F4 4 | 200 | 200 | 0 | Keypress F3 5 | 200 | 200 | 0 | GOTO MACRO LINE | 1 6 | 200 | 200 | 0 | Keypress F1 7 | 200 | 200 | 0 | Keypress F4 8 | 200 | 200 | 0 | GOTO MACRO LINE | 1
Could you help me to check this double loop?
Kind regards.
|
|
|
Post by Steve on Nov 7, 2018 21:46:55 GMT
Hi, Line 5 and line 8 is where you are having issues. Your GOTO conditions need to be added as RUN ACTION conditions. Try using the 'add condition' page when adding conditions. Also the '0' time on the Keypress's might be causing some issues. The macro is going to push those keypress's out as fast at it can, with '0' or 'no' delay. This may be faster than what the desktop can handle; it might be forcing the keypress's at a rate that the application (the location of the keypress) can handle. I'd recommend adding a time value for the keypress's. At least 150/200 ms. Here is what I would change.
Line 1 - remove the ELSE GOTO LINE 2 because it's going to do that anyway if the condition is not true. Lines 3, 4, 6, 7 i've added a 200 ms wait for the keypress Lines 5 and 8 i've fixed the GOTO conditions.
1 | IF | PIXEL COLOR | Color [R=13, G=164, B=255]::At Location [X:140 Y:275] | IS NOT THE SAME | GOTO MACRO LINE | 3 2 | IF | PIXEL COLOR | Color [R=45, G=45, B=200]::At Location [X:180 Y:200] | IS NOT THE SAME | GOTO MACRO LINE | 6 | ELSE | 2 | RUN ACTION | GOTO MACRO LINE | 1 3 | 200 | 200 | 200 | Keypress F4 4 | 200 | 200 | 200 | Keypress F3 5 | RUN ACTION | GOTO MACRO LINE | 1 6 | 200 | 200 | 200 | Keypress F1 7 | 200 | 200 | 200 | Keypress F4 8 | RUN ACTION | GOTO MACRO LINE | 1
|
|
|
Post by lordgabb on Nov 8, 2018 22:29:54 GMT
Thanks a lot Steve! Very good Macro software. I really like it.
|
|