gleem Posted June 20, 2006 Share Posted June 20, 2006 (edited) in an If... Then... statement, is it possible to use either or... such as If $var = $name1 or &name2 Then Msgbox(0,"Success", "Sucess") endif Edited June 20, 2006 by gleem Link to comment Share on other sites More sharing options...
CyberSlug Posted June 20, 2006 Share Posted June 20, 2006 ;You have to do it this way: If ($variable = $name1) or ($variable = $name2) Then MsgBox(0,"test","test") EndIf Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
evilertoaster Posted June 20, 2006 Share Posted June 20, 2006 in an If... Then... statement, is it possible to use either or... such as If $var = $name1 or &name2 Then Msgbox(0,"Success", "Sucess") endifLike just an 'or' statement? If $var=$name1 or $var=$name2 then MsgBox(0,"OK",OK") Endif Link to comment Share on other sites More sharing options...
gleem Posted June 20, 2006 Author Share Posted June 20, 2006 ;You have to do it this way:If ($variable = $name1) or ($variable = $name2) ThenMsgBox(0,"test","test")EndIfok.. that works.... now.... is it possible to have more than 2 checks.. for exampleIf ($variable = $name1) or ($variable = $name2) or ($variable = $name3) or ($variable = $name4) ThenMsgBox(0,"test","test")EndIf Link to comment Share on other sites More sharing options...
Emperor Posted June 20, 2006 Share Posted June 20, 2006 Yes, it is possible to have more than 2 checks. 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