cheesestain Posted January 16, 2013 Share Posted January 16, 2013 I can't seem to figure out why my if statement is not working. The error only comes up if both $ProductCodeReplaceLength and $ProductCodeSearchLength > 21 but not if $ProductCodeSearchLength > 21 If $ProductCodeSearchLength <= 20 Or $ProductCodeReplaceLength <= 20 Then For $a = $ProductCodeSearchLength to 19 $ReadProductCodeSearchInput &= " " Next For $b = $ProductCodeReplaceLength to 19 $ReadProductCodeReplaceInput &= " " Next Else MsgBox(0,"Error","Error1") EndIf Link to comment Share on other sites More sharing options...
JohnOne Posted January 16, 2013 Share Posted January 16, 2013 Or -> And AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
cheesestain Posted January 16, 2013 Author Share Posted January 16, 2013 Thanks! It worked. Little confused though. I thought And meant that both conditions had to be met and that Or meant only one. Link to comment Share on other sites More sharing options...
JohnOne Posted January 17, 2013 Share Posted January 17, 2013 (edited) That is correct, So if either one is outside the bounds of your IF condition the error will show. Edited January 17, 2013 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. 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