beautypg.com

BrightSign BrightScript 2 Reference Guide User Manual

Page 28

background image

28

If BooleanExpression [ Then ]
[ Block ]
[ ElseIfStatement+ ]
[ ElseStatement ]
End If

ElseIfStatement ::=
ElseIf BooleanExpression [ Then ]
[ Block ]

ElseStatement ::=
Else
[ Block ]


For example:

vp_msg_loop:
msg=wait(tiut, p)

if type(msg)="rovideoevent" then

if debug then print "video event";msg.getint()
if lm=0 and msg.getint() = meden then
if debug then print "videofinished"
retcode=5
return
endif
else if type(msg)="rogpiobutton" then
if debug then print "button press";msg
if esc0 and msg=b0 then retcode=1:return
if esc1 and msg=b1 then retcode=2:return
if esc2 and msg=b2 then retcode=3:return
if esc3 and msg=b3 then retcode=4:return
else if type(msg)=" Invalid" then
if debug then print "timeout"
retcode=6
return
endif

goto vp_msg_loop