Doxie Posted July 1, 2004 Share Posted July 1, 2004 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 More sharing options...
trids Posted July 1, 2004 Share Posted July 1, 2004 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" ThenHTH Link to comment Share on other sites More sharing options...
Doxie Posted July 1, 2004 Author Share Posted July 1, 2004 ah haa Were ever i lay my script is my home... 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