
If ('mode' > 5) Then Cue 1 Go Else Cue 2 Go
In the above example, if the value of
mode
is greater than 5, then Cue 1 will execute, but if
mode
is 4 or
less, then Cue 2 will execute. Since no commands are present after the “Cue 2 Go”, an
EndIf
is not
necessary.
Using Endif
In the basic form of the
If .. Then
statements,
all
of the commands after the
Then
will be executed if the
expression is true. In the case where additional non-conditional commands are needed after the
If .. Then
statement, use the
Endif
keyword to end the conditional part of the
If .. Then
statement.
For example, in the following command, Cue 1 will execute
and
Playback 2 will be cleared if the
showEnabled
variable is 1:
If ('showEnabled' == 1) Then Cue 1 Go; Playback 2 Clear
But, by inserting the
Endif
keyword, the script can be changed to have Cue 1 execute only if the
showEnabled
variable is 1, but Playback 2 is always cleared:
If ('showEnabled' == 1) Then Cue 1 Go Endif Playback 2 Clear
Using Multiple Lines
The
If .. Then .. Else
statements can also be used across multiple lines of code, which is particularly useful
when the script becomes more complex:
Playback 1
If ('testMode' == 1) Then
Cue 1 Go
Else
Cue 2 Go
EndIf
Playback 2 Clear
<hr>
Interactive Technologies, Inc.
CueServer 2 User's Manual - 18.5.18
Page 275 of 429
Содержание CueServer 2
Страница 95: ... U20_3BE S18_3LE S18_3BE U18_3LE Interactive Technologies Inc CueServer 2 User s Manual 18 5 18 Page 93 of 429 ...
Страница 168: ...See Also At Off On Set Interactive Technologies Inc CueServer 2 User s Manual 18 5 18 Page 166 of 429 ...
Страница 187: ...See Also Playback Release Interactive Technologies Inc CueServer 2 User s Manual 18 5 18 Page 185 of 429 ...
Страница 223: ...See Also Release Interactive Technologies Inc CueServer 2 User s Manual 18 5 18 Page 221 of 429 ...
Страница 238: ...See Also Clear Playback Press Interactive Technologies Inc CueServer 2 User s Manual 18 5 18 Page 236 of 429 ...
Страница 260: ...See Also Record Group Interactive Technologies Inc CueServer 2 User s Manual 18 5 18 Page 258 of 429 ...
Страница 286: ...Web Server Environment Variables Interactive Technologies Inc CueServer 2 User s Manual 18 5 18 Page 284 of 429 ...
Страница 342: ...Show File Format Interactive Technologies Inc CueServer 2 User s Manual 18 5 18 Page 340 of 429 ...
Страница 346: ...Configuration Files show cfg Interactive Technologies Inc CueServer 2 User s Manual 18 5 18 Page 344 of 429 ...