Greetings everyone, I have done several searches in the help file, and on the internet, but could still use your help. I would like to check 6 different positions for a color(say 0xD79C4E), and if they are what I want then continue the script, if not then do something else. So what I'm thinking is instead of looking for a positive outcome of the color in the window, look for the absence of it, kind of like so:
$pixel1 = PixelGetColor(1, 1)
$pixel2 = PixelGetColor(2, 2)
$pixel3 = PixelGetColor(3, 3)
$pixel4 = PixelGetColor(4, 4)
$pixel5 = PixelGetColor(5, 5)
$pixel6 = PixelGetColor(6, 6)
If $pixel1 = 0xFFFFFF Then; If it's white then search failed
Exit
ElseIf $pixel2 = 0xFFFFFF Then; If it's white then search failed
Exit
ElseIf $pixel3 = 0xFFFFFF Then; If it's white then search failed
Exit
ElseIf $pixel4 = 0xFFFFFF Then; If it's white then search failed
Exit
ElseIf $pixel5 = 0xFFFFFF Then; If it's white then search failed
Exit
ElseIf $pixel6 = 0xFFFFFF Then; If it's white then search failed
Exit
Else
Do something here;Something other than white background at all positions, so carry on.
Would this be the cleanest way to code it, or is there a better way?
Thank you in advance for any and all replies.
EDIT: I know the code isn't totally kosher, but I just wanted to get the idea across.