Jump to content

Usage of 'OR'

Recommended Posts

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
   ;neither of the pixels was found

[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.

Link to comment
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...