Jump to content

AND OR operator question


Cusem
 Share

Recommended Posts

I don't know exactly how autoit cumulates and handles AND and OR operators.

If $c = $d AND $a + $b = 14 AND $a = 1 OR $b = 1 Then

I'm not sure how the OR will be treated.

For this to be TRUE, I want:

$c = $d must be TRUE

$a + $b = 14 must be TRUE

$a = 1 OR $b=1 one of these two must be TRUE (So $a=1 is sufficient, $b doesn't have to be 1, but if $a <> 1, $b has to be 1)

Will this work?

Or do I have to create another IF statement within the first IF statement? Or is there another possibility like working with ()'s like

If $c = $d AND $a + $b = 14 AND ($a = 1 OR $b = 1) Then

Thanks!

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
 Share

  • Recently Browsing   0 members

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