Sign in to follow this  
Followers 0
Xav

Or #2 color

8 posts in this topic

#1 ·  Posted (edited)

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

Share this post


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

Share this post


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

Share this post


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

try to make 2 functions of it?

Share this post


Link to post
Share on other sites

Yes

Share this post


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

Share this post


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

Share this post


Link to post
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")

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