Jump to content
Sign in to follow this  
Zer0Velocity

Pixel search 2 colors

Recommended Posts

Zer0Velocity

Hey guys, I would like to know how to search for 2 colors side by side and has to match those 2 colors, not just 1. Then does the rest of the script.

Thanks. :)

Share this post


Link to post
Share on other sites
Zer0Velocity

No takers on this 1? :)

Share this post


Link to post
Share on other sites
Paulie

$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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.