|
Post by Chris on Jan 31, 2021 1:06:58 GMT
My macro seems to stop after only 1 iteration. The pixel in question is normally [R=221, G=74, B=112]. I want to keep clicking a button 100 times again until it changes. However, it only clicks the first 100 times, and then stops. If as a test I change the pixel to some other color, it properly clicks 100 times, and then clicks the 400|600 before exiting.
What am I doing wrong?
15 | FOR | I | = | 0 TO 100 | NEXT
20 | 1000 | 350 | 25 | Left Click
25 | FOR | NEXT
30 | IF | PIXEL COLOR | Color [R=221, G=74, B=112]::At Location [X:450 Y:600] | IS THE SAME | GOTO MACRO LINE | 15
35 | 450 | 600 | 25 | Left Click
|
|
|
Post by Chris on Jan 31, 2021 1:33:32 GMT
After reading other posts, it works fine when I GOTO a label, and not a functional line. This is a nuisance!
* | Label 15 | FOR | I | = | 0 TO 100 | NEXT
20 | 1000 | 350 | 25 | Left Click
25 | FOR | NEXT
30 | IF | PIXEL COLOR | Color [R=221, G=74, B=112]::At Location [X:450 Y:600] | IS THE SAME | GOTO MACRO LINE | Label 35 | 450 | 600 | 25 | Left Click
|
|
|
Post by zeak on Feb 1, 2021 4:42:04 GMT
Hi Chris, I cannot seem to replicate this problem, I noticed your lines are 15,20,25,30,35. Can I ask if you have manually changed these line number? Because I feel that could be causing a issue, to correct this - click on one of your lines and right click then 'Relist Rows', you will have to redirect your GoTo Macro Line after. But personally I use labels all the time so that if at a future point I update the macro, I don't have to remember which lines were pointing to a particular line.
|
|
|
Post by zeak on Feb 1, 2021 4:44:26 GMT
To confirm, the action GoTo Macro Line will not see a line that has been manually changed to a different number. If you have the first line as 15 but tell GoTo Macro Line 1, the first line will still be selected.
|
|