Sign in to follow this  
Followers 0
Doxie

What about OR :/

3 posts in this topic

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
:D ah haa

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0