Jump to content

PixelSearch, IF NOT?


Recommended Posts

Func One()
    $coord = PixelSearch( 874, 6, 874, 6, 0x63656B, 10 )
    If IsArray($coord) Then   
        MouseClick("left", 874, 6, 1, 0)                                                    
        SomeOtherFunction()                                       
    EndIf
EndFunc

How can I make it so the pixel color is NOT 0x63656B, then it would play SomeOtherFunction?

Edited by bigassmuffin
Link to comment
Share on other sites

Func One()
$coord = PixelSearch( 874, 6, 874, 6, 0x63656B, 10)
If IsArray($coord) Then
MouseClick("left", 874, 6, 1, 0)
EndIf
EndFunc

Func Two()
;63656B(Hex)  = 6514027(Decimal)
$search = PixelGetColor(874,6)
If $search <> "6514027" Then
;Whatever you like it to do
    
EndIf
EndFunc

Edited by Sardith

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Func One()
$search = PixelGetColor(874,6)
Sleep(10)
If $search <> "6514027" Then
    Sleep(100)
    Else
$coord = PixelSearch( 874, 6, 874, 6, 0x63656B, 10)
Sleep(10)
If IsArray($coord) Then
MouseClick("left", 874, 6, 1, 0)
Endif
EndIf
EndFunc

Something more like that?

Edited by Sardith

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Func One()
$search = PixelGetColor(874,6)
If $search <> "6514027" Then
    Sleep(100)
    Else
$coord = PixelSearch( 874, 6, 874, 6, 0x63656B, 10)
If IsArray($coord) Then
MouseClick("left", 874, 6, 1, 0)
Endif
EndIf
EndFunc

Something more like that?

TY, ill try that,m looks gr8!

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