Sign in to follow this  
Followers 0
kazhkaz

many colors

6 posts in this topic

Is it possible to command PixelSearch to search not for only one color, but for two,three or more? :P

Share this post


Link to post
Share on other sites



PixelSearch in it's 6 parameter has a shade variation, however if you are looking for 'multiple' colors all together you would have to do 'multiple' PixelSearch()'s with the specific colors you desire to find.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

no :P i need that it find one of the colros listed :lmao:

Share this post


Link to post
Share on other sites

no :P i need that it find one of the colros listed :lmao:

Right, that's what I'm saying...

Example:

Dim $Color_One = 0xFF0000
Dim $Color_Two = 0x0000FF
Dim $Color_Three = 0xFFFF00

While 1
    $PxSrch_One = PixelSearch(0, 0, 100, 100, $Color_One)
    $PxSrch_Two = PixelSearch(0, 0, 100, 100, $Color_Two)
    $PxSrch_Three = PixelSearch(0, 0, 100, 100, $Color_Three)
    
    If Not @error And IsArray($PxSrch_One) Then
        MsgBox(0, "", "X Coord is: " & $PxSrch_One[0] & " Y Coord is: " & $PxSrch_One[1])
    ElseIf Not @error And IsArray($PxSrch_Two) Then
        MsgBox(0, "", "X Coord is: " & $PxSrch_Two[0] & " Y Coord is: " & $PxSrch_Two[1])
    ElseIf Not @error And IsArray($PxSrch_Three) Then
        MsgBox(0, "", "X Coord is: " & $PxSrch_Three[0] & " Y Coord is: " & $PxSrch_Three[1])
    EndIf
    
    Sleep(100)
Wend

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Thanks :P

Share this post


Link to post
Share on other sites

Thanks :P

look in scripts and scraps for _PixelSearchX

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0