Viz Trio User Guide
Version 3.2 | Published June 29, 2021 ©
Working with Macro Commands
This section covers the following topics:
Trio Client Commands Window
The Viz Trio user interface generally uses the same macro commands as the scripting support uses. To find commands that are executed when different user interface operations are performed, use the commands window to see which commands are sent. The actual commands are what can be seen after the colon:
page:read
1000
The Trio Client Commands window can be very helpful when learning the system and the macro commands. Enter commands in the text field at the bottom and click the Execute button to run the command to test your customized command.
Enabling the Trio Client Commands Button
Click Viz Trio’s Config button, and in the User Interface > User Restrictions section, clear the Call Viz Trio Commands check box.
Opening the Trio Client Commands Window
Click the Trio Commands button in the lower-right corner of the application window.
Apropos and Help Commands
Use Trio Client Commands window features when searching for information about a command.
The keywords apropos and help can be used to perform look-ups in the available set of commands.
-
apropos: Searches command names and descriptions for a string.
-
help: Shows help for the specified command, or lists commands.
Example I: Apropos
COMMAND: main:apropos context_variable RESULT: show:get_context_variable(string variable) : Get the show-context-variable. show:set_context_variable(string variable, restString value) : Set the show-variant to a
new
value.
Example II: Help
COMMAND: main:help read_template RESULT: Parameters: (string templateid) Description: Read a template
if
concepts and variants are enabled. If not, read a normal template.
Show, Context and Tab-field Commands
Show variables are global variables as all variables are stored on the Media Sequencer. Meaning that all Viz Trio applications using the same Media Sequencer can set and get the variables, and any script within a show can access the variable.
This section covers the following topics:
Show Variables
Use the Trio Client Commands window to set show variables. The variables can be used by scripts as a means of storing intermediate values such as counters.
Commands:
-
show:set_variable: Sets the value of a show variable.
-
show:get_variable: Gets the value of a show variable.
Example commands:
COMMAND: show:set_variable MyShowVar Hello World! COMMAND: show:get_variable MyShowVar RESULT: Hello World!
Script example:
Sub OnUserClick() dim myLocalShowVar myLocalShowVar = TrioCmd(
"show:get_variable MyShowVar"
) MsgBox(
"Variable value is: "
& myLocalShowVar) myLocalShowVar = InputBox(
"Enter a new Value:"
,
"New Value"
) TrioCmd(
"show:set_variable MyShowVar "
& myLocalShowVar) End Sub
Concept, Context and Variant Variables
Use the Trio Client Commands window to set context variables. Context variables are different than Show Variables as context variables are used to select the context a page is taken on-air with. The following contexts are available to Viz Trio users:
-
Concept: A concept can be News or Sports or any other concept. Graphics in the same concept are created as individual scenes belonging to a specific concept.
-
Variant: A concept can have different variants of the same scene. This can be a scene with the same tab-fields, but displayed as a top or lower third.
-
Context: Additional user-defined contexts can be used to further differentiate a concept and its variants. For example the context Platform could have SD, HD, Mobile phones, web and so on defined within the concepts News and Sport.
Commands
If a concept, context or variant for a show is set using one of the show commands, for example show:set_variant top, this will override the selection done in the page list’s user interface, marking the variant with square brackets. Issuing the same command, without the variant name (show:set_variant ) resets the variant to the initial selection done using the page list user interface.
Note: A get command cannot retrieve a variable’s value if not a set command is issued first.
Available commands:
-
show:enable_context(): Enables concept and variant for the current show. This will also separate templates and pages into their own lists.
-
show:set_concept(restString concept): Sets the show’s concept to a new value.
-
show:get_concept(): Gets the show’s concept if set by a set command.
-
show:set_context_variable (string variable, restString value): Sets the show’s context to a new value.
-
show:get_context_variable (string variable): Gets the show’s context variable if set by a set command.
-
show:set_variant (restString variant): Sets the show’s variant to a new value.
-
show:get_variant(): Get the show’s variant if set by a set command.
-
playlist:set_concept(string value): Sets the concept for a show playlist.
-
page:arm_copy <page-name> [<channel-name>]: Arms a copy of a page for firing. If channelName is empty, the default channel is used. If the original page is changed or deleted after arming, it will not affect the armed page.
-
page:arm_copy_of_current [<channel-name>]: Arms a copy of the current page for firing. If channelName is empty, the default channel is used. If the original page is changed or deleted after arming, it will not affect the armed page.
-
page:arm_copy_of_selected [<channel-name>]: Arms a copy of the selected page on its assigned channel or on the given channel, if defined. If the original page is changed or deleted after arming, it will not affect the armed page.
Note: The set_variant and get_variant commands are aliases for the context commands when setting and getting variants, and are not applicable for other contexts.
Example commands:
COMMAND: show:set_context_variable concept Sport COMMAND: show:set_context_variable variant Lower COMMAND: show:set_context_variable platform HD COMMAND: show:get_context_variable concept RESULT: Sport COMMAND: show:get_context_variable variant RESULT: Lower COMMAND: show:get_context_variable <contextname> RESULT: HD
A parameter must be set using the commands, before it can be shown using the commands. An output will normally differ depending on the scene design, therefore not all the output is shown.
IMPORTANT! Command parameters are case sensitive.
Tab-field Variables
Use the Viz Trio’s commands window to set custom properties for tab-fields. The property can be used for scripting to set intermediate properties for tab-fields.
Commands:
-
set_custom_property (string tabfieldName, string value)
-
get_custom_property (string tabfieldName)
-
show_custom_property_editor_for_current_tabfield
Example commands:
COMMAND: tabfield:set_custom_property
01
string COMMAND: tabfield:get_custom_property
01
RESULT: string