Jump to content

Or #2 color


 Share

Recommended Posts

So, i want to put another color Where i said...

How can i put the other color??

Sleep(3000)

While 1
PixelSearch( 76, 572,76, 572, 0x604C3C  Or the other color)
If @error Then
Sleep(2000)
Send("1")
EndIf
Wend
Edited by Xav
Link to comment
Share on other sites

So, i want to put another color Where i said...

How can i put the other color??

Sleep(3000)

While 1
PixelSearch( 76, 572,76, 572, 0x604C3C  Or the other color)
If @error Then
Sleep(2000)
Send("1")
EndIf
Wend
just make a new line?

Sleep(3000)

While 1
PixelSearch( 76, 572,76, 572, 0x604C3C)
PixelSearch( 76, 572,76, 572, the other color)
If @error Then
Sleep(2000)
Send("1")
EndIf
Wend

or what?

Link to comment
Share on other sites

It can't be this becose, if it get the first color it will send "1" but it's the #2 color

just make a new line?

Sleep(3000)

While 1
PixelSearch( 76, 572,76, 572, 0x604C3C)
PixelSearch( 76, 572,76, 572, the other color)
If  @error Then
Sleep(2000)
Send("1")
EndIf
Wend

or what?

Link to comment
Share on other sites

So, i want to put another color Where i said...

How can i put the other color??

Sleep(3000)

While 1
          Sleep (50)
          blabla()
          blabla2()
Wend

Func blabla()
        PixelSearch( 76, 572,76, 572, 0x604C3C)
        If @error Then
        Sleep(2000)
        Send("1")
        EndIf
Endfunc

Func blabla2()
        PixelSearch( 76, 572,76, 572, the other color)
        If @error Then
        Sleep(2000)
        Send("1")
        EndIf
Endfunc
if thats not it I don't think I understand your problem -.-
Link to comment
Share on other sites

Are you trying to look for color1 and execute a function if it's found, otherwise look for another color and execute another function if it is found?

That would look something like this:

While 1
    PixelSearch( 76, 572,76, 572, 0x604C3C)
    if @error then
        PixelSearch( 76, 572,76, 572, the other color)
        If @error Then
        Else 
        func2()
        EndIf
    Else 
    func1()
    EndIf
WEnd

Func func1()
Send("1")
EndFunc

Func func2()
Send("2")
Endfunc

Wich will send "1" if color 1 is found, or "2" if color 2 is found.

Link to comment
Share on other sites

I think it should work ill try and repost in a bit!

While 1
    PixelSearch( 76, 572,76, 572, 0x604C3C)
    if @error then
        PixelSearch( 76, 572,76, 572, the other color)
        If @error Then
            Send("1")
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...