vickerps Posted March 5, 2004 Share Posted March 5, 2004 How do you use the OR statement example: IF $NoReceiptPrnt <5 OR >10 Then Link to comment Share on other sites More sharing options...
Valik Posted March 5, 2004 Share 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) Link to comment Share on other sites More sharing options...
Administrators Jon Posted March 5, 2004 Administrators Share Posted March 5, 2004 IF $NoReceiptPrnt <5 OR $NoReceiptPrnt >10 Then Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
vickerps Posted March 5, 2004 Author Share 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 Link to comment Share on other sites More sharing options...
Valik Posted March 5, 2004 Share Posted March 5, 2004 If Not($name = "paul") or you can use If $name <> "paul" Link to comment Share on other sites More sharing options...
Nutster Posted March 5, 2004 Share 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... Link to comment Share on other sites More sharing options...
Valik Posted March 5, 2004 Share 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). Link to comment Share on other sites More sharing options...
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