maxcronjob Posted July 7, 2005 Share Posted July 7, 2005 Hi, I seemed to have hit a wall in my script. I'm using AutoIt to test the installed software and hardware on a system. I'm using a lot of assertion tests and the last test I was using was where I took the results from the "systeminfo" command line call and am extracting line-by-line from a text document and testing for certain values. Basically, I came to a point in my script where an If test seems to be bringing back it's own logic. e.g: If $This = "01" OR "02" Then If $Line41 = "1" OR "2" OR "3" OR "4" Then If $Line41 = "1" Then do all this ElseIf $Line41 = "2" OR "3" OR "4" Then do all this Else write this to the log EndIf EndIf EndIf So I actually capture what the $Line41 is in my Log and it's a "[". Only the test is seeing it as "1". Maybe my script is too much for AutoIt to handle. Any suggestions? max Link to comment Share on other sites More sharing options...
Developers Jos Posted July 7, 2005 Developers Share Posted July 7, 2005 (edited) Hi,If $This = "01" OR "02" Then If $Line41 = "1" OR "2" OR "3" OR "4" Then<{POST_SNAPBACK}>Wrong OR syntax:If $This = "01" Or $This = "02" Then If $Line41 = "1" Or $Line41 = "2" Or $Line41 = "3" Or $Line41 = "4" Then Edited July 7, 2005 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
scriptkitty Posted July 7, 2005 Share Posted July 7, 2005 I also like to use CASE, very clean in many cases. AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
maxcronjob Posted July 7, 2005 Author Share Posted July 7, 2005 Okay, so the documentation for the OR operator wasn't as detailed as your response. You guys ROCK! Did I fail to mention how much you guys ROCK!!!??? thanks again. max 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