|
Post by thenameiseaston on Aug 26, 2018 17:12:27 GMT
I would like my macro to cycle the blue pixel color from 120 to 130, if that is even possible.
1 | 1027 | 927 | 100 | Mouse Movement
2 | IF | PIXEL COLOR | Color [R=255, G=255, B=125]::At Location [X:1027 Y:927] | IS NOT THE SAME | WAIT SECONDS | 1.5
3 | 1027 | 927 | 500 | Mouse Movement
4 | IF | PIXEL COLOR | Color [R=255, G=255, B=125]::At Location [X:1027 Y:927] | IS THE SAME | CONTINUE
5 | 1027 | 927 | 200 | Left Click
7 | 1027 | 927 | 100 | Mouse Movement
8 | IF | PIXEL COLOR | Color [R=0, G=0, B=0]::At Location [X:1027 Y:927] | IS THE SAME | CONTINUE | ELSE | 8 | IF | PIXEL COLOR | Color [R=0, G=0, B=0]::At Location [X:1027 Y:927] | IS NOT THE SAME | GOTO MACRO LINE | 7
9 | 1237 | 1000 | 200 | Mouse Movement
10 | 1237 | 1000 | 200 | Left Click
Can I define the integer as 120 and have it check and and one if it isnt the same, then repeat until the color is the same then continue?
|
|
|
Post by thenameiseaston on Aug 26, 2018 17:50:44 GMT
I figure this works, but I feel like it's too bulky: 1 | RUN ACTION | | | | DEFINE INTEGER VARIABLE | %INTEGER1%::120 2 | 1027 | 927 | 100 | Mouse Movement 3 | IF | PIXEL COLOR | Color [R=255, G=255, B=%INTEGER1%]::At Location [X:1027 Y:927] | IS NOT THE SAME | WAIT SECONDS | 1.5 4 | 1027 | 927 | 1500 | Mouse Movement 5 | RUN ACTION | | | | GOTO MACRO LINE | 7 6 | RUN ACTION | | | | DEFINE INTEGER VARIABLE | %INTEGER1%::+1 7 | IF | PIXEL COLOR | Color [R=255, G=255, B=%INTEGER1%]::At Location [X:1027 Y:927] | IS NOT THE SAME | GOTO MACRO LINE | 6 | ELSE | CONTINUE 8 | 1027 | 927 | 200 | Left Click 9 | 1027 | 927 | 100 | Mouse Movement 10 | IF | PIXEL COLOR | Color [R=0, G=0, B=0]::At Location [X:1027 Y:927] | IS THE SAME | CONTINUE | ELSE | 10 | IF | PIXEL COLOR | Color [R=0, G=0, B=0]::At Location [X:1027 Y:927] | IS NOT THE SAME | GOTO MACRO LINE | 9 11 | 1237 | 1000 | 200 | Mouse Movement 12 | 1237 | 1000 | 200 | Left Click
|
|
|
Post by Steve on Aug 27, 2018 0:45:44 GMT
I might have an easier way.
Try using a FOR block:
1 | FOR | I | = | 29 TO 40 | NEXT 2 | IF | PIXEL COLOR | Color [R=237, G=28, B=%I%]::At Location [X:621 Y:257] | IS THE SAME | RUN VIA CMD /C | ping -n 2 127.0.0.1>nul 3 | FOR | | | | NEXT
The example above loops from 29 through to 40. The color currently at mouse X 621 and Y 257 is R=238 G=28 B=36. When the FOR counter (%I%) loops through to that color (B=36) then I run a quick command prompt that flashed up. The cmd prompt just shows me that my value was reached. Obviously this could be any action.
If you need anymore help with FOR looping let me know.
Regards, Steve.
|
|