Sign in to follow this  
Followers 0
Forge

Usage of 'OR'

2 posts in this topic

$coord = PixelSearch( 850, 300, 1024, 768, 0x80ACE8, 15)

Do it work if I write.

$coord = PixelSearch( 850, 300, 1024, 768, 0x80ACE8 [COLOR=blue]OR[/COLOR] 0x80ACF8, 15)

Share this post


Link to post
Share on other sites



Do it work if I write.

$coord = PixelSearch( 850, 300, 1024, 768, 0x80ACE8 [COLOR=blue]OR[/COLOR] 0x80ACF8, 15)
No, because you need two complete conditional statements to use the OR operator. If you're searching for either one of two colors, you'd have to do something like this:

PixelSearch( 850, 300, 1024, 768, 0x80ACE8, 15)
$color1 = NOT @error
PixelSearch( 850, 300, 1024, 768, 0x80ACF8, 15)
$color2 = NOT @error

If $color1 OR $color2 Then
   ;one, or both, of the pixels was found
Else
   ;neither of the pixels was found
EndIf

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

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