Jump to content

Stupid Question regarding <> and OR


Recommended Posts

ok.. i have my script read from a text file a certain area... now.. i want some error control.. so if the number that it reads is not equal to the 3 numbers i have in my script i want it to display an error and exit..

heres the section of script i have now..

and yes $inc is being parsed from the file correctly.

If $inc <> "373" OR $inc <> "251" OR $inc <> "ABC" Then
    MsgBox(0,"Error","The value "&$inc&" is not refrenced in the verify script")
    Exit
EndIf

any ideas?

Link to comment
Share on other sites

  • Developers

Your test is always true... you probably need:

If $inc <> "373" And $inc <> "251" And $inc <> "ABC" Then

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