Sign in to follow this  
Followers 0
Mutalgaettae

and/or

4 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by snowmaker

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

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

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