Jump to content

Limit to # of IF tests?


Recommended Posts

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

  • Developers

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 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

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...