SwiftTec Interactive Media System Help

Scripting

The SwiftTec Interactive Media System uses a text-based custom script engine to allow the script writer a great deal of flexibility on how the media is displayed. The script allows the following events:

The script is the power behind the interactive media system allowing for a truly interactive process with the audience.

Script Syntax

Scripts are text files with a .ims suffix and should be edited in an editor such as gvim or notepad. The following syntax is expected:

Action Syntax Description
Comment # xxxx Comments are inserted by having a # at the beginning of a line. The rest of that line is ignored.
Label :label Lines starting with a colon followed by some text are labels which can be used as targets for the goto statement
Goto Line goto :label The goto statement changes the script execution location to the newly specified location.
Set a variable set param=value Sets the script variable param to have the value specified. Some variables have special meanings (see the table below)
Expand a variable ${param} The value of the script variable param is substituted whenever this syntax is encountered
Perform a test if (condition) action This allows actions to be take based on the results of the test. Condition takes the form of one or more tests. Multiple test must be joined with && or ||

&& = AND
|| = OR
== Equal to
!= Equal
< Less than
<= Less than or equal
>= Greater than or equal
> Greater than

If the following condition is written

if (p1 > 1)

the variable p1 is automatically expanded. The ${p1} syntax is not required
Show Text on Screen text "string" The specified string will be displayed on the main screen using the current colours and alignment
Show Image on screen show imagefile This will display the specified imagefile on the main screen.
Show Video Clip play mediafile This will display the specified media file on the main screen
Wait for media wait The script waits until the current media has stopped playing before resuming exectution
Wait for a time period sleep nsecs The script waits for nsecs seconds before resuming execution
Display text on the voting tablets polltext "string" The specified string will be displayed on the voting tablets using the current voting colours and alignment
Poll the audience poll results "title" nsecs options.... An audience poll is started by displaying the specified title on the voting tablets along with one button for each option specified. The poll is displayed for nsecs seconds before closing. The most popular option (an integer starting at 0) is stored in the results parameter specified.
Clear the output window outputclear Clears the output window
Add text to the output window outputtext "string" The specified string will be added to the output window

Special Script Variables

Variable Description
bgcolor The main screen background colour. Uses HTML format #rrggbb
fgcolor The main screen text colour. Uses HTML format #rrggbb
halign Horizontal text alignment on the main screen (left, center or right)
valign Vertical text alignment on the main scrren (top, middle or bottom)
font The font to be used for the text on the main screen - use "type:size:style" where style is one or more or normal,bold,italic
pollbgcolor The voting screen background colour. Uses HTML format #rrggbb
pollfgcolor The main screen text colour. Uses HTML format #rrggbb
voters The current number of registered voting tablets (Read only)
outputflags This numeric value combines a number of flags which control the output sent to the output window

0 = no special output - only outputtext commands function
1 = output polling information
2 = output text sent to the polling devices
4 = output text sent to the main display

the actual value should be calculated by adding the flags together

 

Copyright 2013 SwiftTec - All Rights Reserved