Jump to content

What about OR :/


Recommended Posts

I'm trying to use OR in my script, but its not working.

When i use OR, i get the ELSE even if one of the OR is correct.

If $IP = "40.212.4.001" Then
  GuiSetControl("pic", $Ok, 130,10,80,25)
    Else
  GuiSetControl("pic", $NotOk, 130,10,80,25)
    EndIf

I want it to look like this:

If $IP = "40.212.4.1" OR  "40.212.4.2" OR "40.212.4.3" Then
  GuiSetControl("pic", $Ok, 130,10,80,25)
    Else
  GuiSetControl("pic", $NotOk, 130,10,80,25)
    EndIf

But then it send the Control, NotOk, even if one of the IP is correct.

Were ever i lay my script is my home...

Link to comment
Share on other sites

OR must have a condition on both sides of it. From your example, this is a condition, but this is not ...

If $IP = "40.212.4.1" OR "40.212.4.2" OR "40.212.4.3" Then

... rather say this instead ..

If $IP = "40.212.4.1" OR $IP = "40.212.4.2" OR $IP = "40.212.4.3" Then

HTH :D

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