Jump to content

How Do You Use Or, Not, And


Recommended Posts

AND, OR, and NOT are used with entire conditions, not values (well not like that anyway :whistle: ). So, use these like this:

If $i > 15 AND $j < 15 Then

The conditions $i>15 and $j<15 must both be true for the entire thing to be considered true.

If $i > 15 OR $j > 15 Then

The conditions $i>15 and $j>15 must either be true for the entire thing to be considered true. If both are true, it is still considered true.

If NOT $i>15 THEN

Reverse the value of the condition. You might want to use

If $i <= 15 THEN

instead.

David Nuttall
Nuttall Computer Consulting

An Aquarius born during the Age of Aquarius

AutoIt allows me to re-invent the wheel so much faster.

I'm off to write a wizard, a wonderful wizard of odd...

Link to post
Share on other sites

CODE 

If NOT $i>15 THEN

Reverse the value of the condition. You might want to use

David, I think because of the operator precedence stuff, that is resolved to (NOT $i)>15 when what you really meant was Not($i > 15).

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...