Jump to content

Recommended Posts

Posted (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 by gleem
Posted

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

Like just an 'or' statement?

If $var=$name1 or $var=$name2 then
    MsgBox(0,"OK",OK")
Endif
Posted

;You have to do it this way:

If ($variable = $name1) or ($variable = $name2) Then

MsgBox(0,"test","test")

EndIf

ok.. that works.... now.... is it possible to have more than 2 checks.. for example

If ($variable = $name1) or ($variable = $name2) or ($variable = $name3) or ($variable = $name4) Then

MsgBox(0,"test","test")

EndIf

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...