Smithy963 Posted October 29, 2006 Share Posted October 29, 2006 i dont think i quite get this, ;MyPixelLocation =(100, 100) ;MyRodLocationLeft =(40, 60) ;MyRodLocationRight =(60, 60) $MyPixelColor = hex(0xFFF1FF) $MyRodColor = hex(0xFF0FFF) ;!= means "is not equal to" ? While PixelGetColor(100, 100) != $MyPixelColor Then;go back to while else;? if PixelGetColor(40, 60) = $MyRodColor then;press right elseif PixelGetColor(60, 60) = $MyRodColor Then;press left else;go back to first 'if statement' EndIf @error any help or even a point in the right direction would help, thank you in advance. Smithy963. Link to comment Share on other sites More sharing options...
AzKay Posted October 29, 2006 Share Posted October 29, 2006 While 1 $px = PixelGetColor(100, 100) If $px = $MyPixelColor Then If PixelGetColor(40, 60) = $MyRodColor Then Send("{RIGHT}") If PixelGetColor(60, 60) = $MyRodColor Then Send("{LEFT}") EndIf WEnd # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Smithy963 Posted October 29, 2006 Author Share Posted October 29, 2006 so im reeling in a fish, my rod swings left, my program presses right, if my rod then swings right, it presses left? Link to comment Share on other sites More sharing options...
ame1011 Posted October 30, 2006 Share Posted October 30, 2006 (edited) While 1 $px = PixelGetColor(100, 100) If $px <> $MyPixelColor Then If PixelGetColor(40, 60) = $MyRodColor Then Send("{RIGHT}") If PixelGetColor(60, 60) = $MyRodColor Then Send("{LEFT}") EndIf WEnd oÝ÷ Ú*ÞqÊ&zwZuاØ^½ªâi¹^±«¢+Ø(ÀÌØíI½a0ôÐÀ(ÀÌØíI½aHôØÀ(ÀÌØíI½dôØÀ(ÀÌØíI½MÑÉÑ`ôÄÀÀ(ÀÌØíI½MÑÉÑdôÄÀÀ((íÑ¡½Ñ¡¸½µÌè)]¡¥±Ä(ÀÌØíÁàôA¥á±Ñ ½±½È ÀÌØíI½MÑÉÑ`°ÀÌØíI½MÑÉÑd¤(%ÀÌØíÁà±ÐìÐìÀÌØí5åA¥á± ½±½ÈQ¡¸(%A¥á±Ñ ½±½È ÀÌØíI½a0°ÀÌØíI½d¤ôÀÌØí5åI½ ½±½ÈQ¡¸M¹ ÅÕ½ÐííI%!QôÅÕ½Ðì¤(%A¥á±Ñ ½±½È ÀÌØíI½aH°ÀÌØíI½d¤ôÀÌØí5åI½ ½±½ÈQ¡¸M¹ ÅÕ½Ðíí1QôÅÕ½Ðì¤(¹%)]¹( note: the variables make it easy for you to edit your script should the locations change. Also, the other poster forgot the '<>(not equal to)' and just used the '=(equal to)' operator. Lastly, any noobies who ever need help with a problem, please use this post as an example... So many times I've seen people write things like, "i dont know how to do this, help me!", with no script and no explanation of the problem. The OP here provided a well documented attempt and althought he is not particularly familiar with the language, it becomes really easy to help him. Edited October 30, 2006 by ame1011 [font="Impact"] I always thought dogs laid eggs, and I learned something today. [/font] Link to comment Share on other sites More sharing options...
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