Conditionally run statements.
Select
Case <expression>
statement1
...
[Case
statement2
...]
[Case Else
statementN
...]
EndSelect
| Case <expression> | If the expression is true the following statements up to the next Case or EndSelect statement are executed. If more than one of the Case statements are true, only the first one is executed. |
Local $var = 0
Local $var2 = ""
Select
Case $var = 1
MsgBox(0, "", "First Case expression was true")
Case $var2 = "test"
MsgBox(0, "", "Second Case expression was true")
Case Else
MsgBox(0, "", "No preceding case was true!")
EndSelect