Jump to content

Doing 2 x Pixelsearch and compare both


Shokyu
 Share

Recommended Posts

Hi there i want to do 2 Pixelsearches for 2 different Areas like this :

$Var1 = PixelSearch( 1023, 637, 1026, 637, 0XFFFFFF, 1 )

$Var2 = PixelSearch( 1030, 650, 1030, 650, 0X00000, 1 )

If $var1 = 0X000000 AND $var2 = 0XFFFFFF1 Then

<expression>

These are Areas in a Game wich shown randomly the X is always random but the Y dont changes ( Var1 is a unique Text , Var 2 is a Button )

Seems not to work ( and yes i am a noob oO ) any ideas ?

Link to comment
Share on other sites

  • Moderators

$Var1 = PixelSearch( 1023, 637, 1026, 637, 0xFFFFFF)
If Not IsArray($Var1) Then
    $Var2 = PixelSearch( 1030, 650, 1030, 650, 0x000000)
    If IsArray($Var2) Then
        ;Do something since 0x000000
    EndIf
Else
    ;Do something since 0xFFFFFF was found
EndFunc

Edited by SmOke_N

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

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...