Yobear Posted February 16, 2010 Posted February 16, 2010 I've got the search for a color/parameter language down on a script I'm running. What I'd like to do now rate the hexidecimal values of color in tiers as to which action is taken. I.e. Scans and sees all green squares, mouse clicks a certain point on the screen. (lowest priority) Scans and sees a yellow square amidst the green. Clicks that square (second priority) Scans and sees a red square. Clicks that square (top priority). Is this possible?
Delta Posted February 16, 2010 Posted February 16, 2010 If it's a few specific colors you could so something like this. $green = PixelSearch( 0, 0, 20, 300, 0x00FF00) $yellow = PixelSearch( 0, 0, 20, 300, 0xFFFF00) $red = PixelSearch( 0, 0, 20, 300, 0xFF0000) If IsArray($red) Then ;Do some stuff. ElseIf IsArray($yellow) Then ;Do some other stuff. ElseIf IsArray($green) ;Do something totally different. Else ;Sorry Cap we couldn't find what you was looking for. EndIf [size="1"]Please stop confusing "how to" with "how do"[/size]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now