Sign in to follow this  
Followers 0
bigassmuffin

PixelSearch, IF NOT?

5 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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]

Share this post


Link to post
Share on other sites

Is there a way to jsut addin the first script I posted by jsut adding a Not thing there?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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]

Share this post


Link to post
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!

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  
Followers 0