Jump to content

Pixel search 2 colors


Recommended Posts

$Color1 = 0xFF0000;Red
$Color2 = 0x00FF00;Green
While 1
    Sleep(100)
    $Search1 = Pixelsearch(0,0,@DesktopWidth,@DesktopHeight,$Color1)
    $Search2 = Pixelsearch(0,0,@DesktopWidth,@DesktopHeight,$Color2)
    If IsArray($Search1) AND Isarray($Search2) Then
        Msgbox(0,"Found!","Color 1 ("&$Color1&") - ("&$Search1[0]&","&$Search1[1]&")"&@CRLF& _
                     "Color 2 ("&$Color2&") - ("&$Search2[0]&","&$Search2[1]&")")
        Exit
    EndIf
WEnd

Edited by Paulie
Link to comment
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
 Share

  • Recently Browsing   0 members

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