Xav Posted March 3, 2008 Posted March 3, 2008 (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 March 3, 2008 by Xav
BadBoyDeGekste Posted March 3, 2008 Posted March 3, 2008 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?
Xav Posted March 3, 2008 Author Posted March 3, 2008 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?
BadBoyDeGekste Posted March 3, 2008 Posted March 3, 2008 It can't be this becose, if it get the first color it will send "1" but it's the #2 colortry to make 2 functions of it?
BadBoyDeGekste Posted March 3, 2008 Posted March 3, 2008 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 -.-
Tvern Posted March 3, 2008 Posted March 3, 2008 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.
Xav Posted March 6, 2008 Author Posted March 6, 2008 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")
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now