Jump to content

many colors


Recommended Posts

  • Moderators

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.

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.

Link to comment
Share on other sites

  • Moderators

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

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.

Link to comment
Share on other sites

  • 2 weeks later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...