vickerps Posted March 5, 2004 Posted March 5, 2004 How do you use the OR statement example: IF $NoReceiptPrnt <5 OR >10 Then
Valik Posted March 5, 2004 Posted March 5, 2004 If $NoReceiptPrnt < 5 OR $NoReceiptPrnt > 10 Then... If 1 = 1 AND 2 = 2 Then... (Always true) If Not(1=2) Then (Always true)
Administrators Jon Posted March 5, 2004 Administrators Posted March 5, 2004 IF $NoReceiptPrnt <5 OR $NoReceiptPrnt >10 Then
vickerps Posted March 5, 2004 Author Posted March 5, 2004 Thanks guys I'm now stuck again Example1: IF $name = NOT 'paul' THEN msgbox ------- IF $name = NOT 'paul' OR $name = NOT 'ste' THEN msgbox ------- Doesn't seem to work properly is the "NOT" in the right place
Valik Posted March 5, 2004 Posted March 5, 2004 If Not($name = "paul") or you can use If $name <> "paul"
Nutster Posted March 5, 2004 Posted March 5, 2004 AND, OR, and NOT are used with entire conditions, not values (well not like that anyway ). So, use these like this:If $i > 15 AND $j < 15 ThenThe conditions $i>15 and $j<15 must both be true for the entire thing to be considered true.If $i > 15 OR $j > 15 ThenThe 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 THENReverse the value of the condition. You might want to useIf $i <= 15 THENinstead. David NuttallNuttall 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...
Valik Posted March 5, 2004 Posted March 5, 2004 CODE If NOT $i>15 THEN Reverse the value of the condition. You might want to useDavid, I think because of the operator precedence stuff, that is resolved to (NOT $i)>15 when what you really meant was Not($i > 15).
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now