Mutalgaettae Posted October 17, 2009 Share Posted October 17, 2009 have 2 questions 1. how do i combine these two into one.. While 1 $var = PixelSearch ( 642, 102, 646, 107, 0x181818 ) If not $var = 1 Then Send("{o}") EndIf Sleep(250) WEnd and While 1 $var = PixelSearch ( 642, 102, 646, 107, 0xAF8840 ) If not $var = 1 Then Send("{o}") EndIf Sleep(250) WEnd 2. How do i combine 2 independent codes into one file Link to comment Share on other sites More sharing options...
somdcomputerguy Posted October 17, 2009 Share Posted October 17, 2009 (edited) I believe this would do it.. While 1 $var1 = PixelSearch ( 642, 102, 646, 107, 0x181818 ) $var2 = PixelSearch ( 642, 102, 646, 107, 0xAF8840 ) If NOT $var1 OR $var2 Then Send("{o}") EndIf Sleep(250) WEnd Edited October 17, 2009 by snowmaker - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Bowmore Posted October 17, 2009 Share Posted October 17, 2009 I believe this would do it.. While 1 $var1 = PixelSearch ( 642, 102, 646, 107, 0x181818 ) $var2 = PixelSearch ( 642, 102, 646, 107, 0xAF8840 ) If NOT $var1 OR $var2 Then Send("{o}") EndIf Sleep(250) WEnd The boolean logic in your example is not quite correct. It should be While 1 $var1 = PixelSearch ( 642, 102, 646, 107, 0x181818 ) $var2 = PixelSearch ( 642, 102, 646, 107, 0xAF8840 ) If NOT ($var1 OR $var2) Then Send("{o}") EndIf Sleep(250) WEnd Or While 1 $var1 = PixelSearch ( 642, 102, 646, 107, 0x181818 ) $var2 = PixelSearch ( 642, 102, 646, 107, 0xAF8840 ) If NOT $var1 OR NOT $var2 Then Send("{o}") EndIf Sleep(250) WEnd "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook Link to comment Share on other sites More sharing options...
jebus495 Posted October 18, 2009 Share Posted October 18, 2009 Maybeh While 1 Do Sleep(250) $var1 = PixelSearch(642, 102, 646, 107, 0x181818) $var2 = PixelSearch(642, 102, 646, 107, 0xAF8840) Until @error = 1 Send("{o}") WEnd 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