First of all, I must say, this is easily the best macro software I have ever ran into lol I've downloaded and purchased countless of macro software and this one blows them all out of the water for heavy tasks.
On to my question.
I'm having a slight issue with something that probably has an easy fix.
I'm using WaitPixelColor, but the issue I'm running into is I need this command to recognize TWO colors on the same coordinate! Either one or the other I want to be recognized.
So I'm looking for a command that allows "this color code OR that color code". I need an 'either-or' action to be taken on this.
Look below to see what I mean.
WaitPixelColor>9479616,515,255,1
WaitPixelColor>10927853,515,255,1
As you can see, the coords are exactly the same on these two lines. However, the color code is different because it will depend on the application I'm using if either color code will appear ,and it's random.
So how do I incorporate these two color codes together? I need the macro to recognize either one or the other.
I tried this....
WaitPixelColor>9479616; 10927853,515,255,1 (this did not work)
WaitPixelColor>9479616-10927853,515,255,1 (this did not work)
WaitPixelColor>9479616/10927853,515,255,1 (this did not work)
WaitPixelColor>(9479616;10927853),515,255,1 (this did not work)
I can easily get the macro to recognize one color, but the application i'm working on has 2 different color codes at those coords and it's random whic one appears, yet I need to recognize either 1 or the other.
Thanks in advance!
I need a little help here with WaitPixelColor...
Moderators: JRL, Dorian (MJT support)
You could use GetPixelColor in a loop and have it monitor the X,Y position for the colors and then if either color is found go to a subroutine and perform whatever action you want. Or you could use the same loop and go to a Label instead of a subroutine. There is also image recognition but either one of my examples will work as long as the colors are always the same at the X,Y position.
Go to subroutine example:
Go to label example:
Go to subroutine example:
Code: Select all
Label>WaitPixelColorLoop
Wait>0.1
GetPixelColor>515,255,PC
IF>{(%PC%=9479616)OR(%PC%=10927853)}
GoSub>ColorFound
ENDIF
Goto>WaitPixelColorLoop
SRT>ColorFound
//Do Something
END>ColorFound
Go to label example:
Code: Select all
Label>WaitPixelColorLoop
Wait>0.1
GetPixelColor>515,255,PC
IF>{(%PC%=9479616)OR(%PC%=10927853)}
Goto>ColorFound
ENDIF
Goto>WaitPixelColorLoop
Label>ColorFound
//Do Something
Goto>WaitPixelColorLoop
- CyberCitizen
- Automation Wizard
- Posts: 724
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia