Conditionally run statements.
Case <value> [To <value>] [,<value> [To <value>] ...]
[Case <value> [To <value>] [,<value> [To <value>] ...]
|<expression>||An expression that returns a value. The value from the expression is then compared against the values of each case until a match is found. This expression is always evaluted exactly once each time through the structure.|
|<value> To <value>||The case is executed if the expression is between the two values.|
|<value>||The case is executed if the expression matches the value.|
Case 6 To 11
$msg = "Good Morning"
Case 12 To 17
$msg = "Good Afternoon"
Case 18 To 21
$msg = "Good Evening"
$msg = "What are you still doing up?"
MsgBox(0, Default, $msg)