Scripts

 

<< Click to Display Table of Contents >>

Navigation:  Advanced Features > Scripting >

Scripts

 

Combine any number of script commands into one script.

Write complex tasks and trigger them by script with only one command.

Define parameters and run a script with their respective values.

How To Create Scripts In VERTEX

create a new script via the main menu CREATE  tab

or

open a new Script Editor from main menu WINDOWS tab

Create a new script by clicking on the "Add" button

script-editor-02_zoom70

You are allowed to rename a script from its default name to a custom name such as PlayAll.
If renamed, you can use either Script1 or PlayAll to call and run the script.

informationScript Names
Script names must contain at least one letter. Allowed are letters [a-z], numbers [0-9] and _
Not allowed are mathematical operators like *,+,-, /

 

Press Shortcut CTRL+ Space at the start of an empty  line to open the ScriptWizard: a list of all available commands and elements will be displayed.
Enter a dot after to show a list of all available properties or command for this item.
 
For detailed syntax and structure, please read the topic Vertex Scripting.

Examples

Below you will find examples to help you getting started with scripting.
The prefix // separates comments from script commands.
 

//Assign a new URL to HTML Content 3
Content3.Settings.Url.Value = www.ioversal.com
 
//Wait 3 Seconds
Wait 3
 
// Go to Cue 2 in Playback1 and start playback
Playback1.GotoCuePlay 2

 

// Set Mixlevel of Playback 2 to 0 
Playback2.MixLevel.Value = 0
 
//Fade out Playback1 with fade time 3 seconds
Playback1.MixLevel.FadeValue 0,3
 
//Go to Cue 2 into Playback 2, start Playback and fade in
Playback2.GotoCue 2
Playback2.Play
Playback2.MixLevel.FadeValue 1,3

 

//Backup Script Example for a Session Member
 
// Set System2 as Render and Audio Backup for System1
System1.Settings.RenderSystem.Value = System2
System1.Settings.AudioSystem.Value = System2
 
//wait 3 seconds 
wait 3
 
// Lightware Matrix as Device from Library - switch Input 4 to Output 2
Device1.Connect
Device1.RouteInputToOutput 4,2

 

//Working with tags inside a script and jump to tags inside a script
 
Playback1.Play
wait 2
//jump to tag start
Goto Start
 
//tag position3
:position3
wait 1
Playback1.GotoCue 3
wait 2
//jump to tag end
Goto End
 
//tag start
:Start
Playback1.GotoCue 2
wait 3
Goto position3
 
//tag end
:End
Playback1.Stop

 

 
The Script Monitor helps you with debugging your scripts and the search for errors.

Run a Script

There are different options how to run scripts in VERTEX suiting your project and workflow:
 

1.Run a Script directly out of the script editor by pressing the "Run" button

2.Use the script's name in each scripting field in VERTEX

3. Type the script's name into the command line and confirm with ENTER.

 

informationRunning scripts that have been renamed
If a script has been  renamed, use either the default name of the script or its new name.
For example: Script1 was renamed to PlayAll. To run it,  type into a scripting field or the command line either Script1 or PlayAll.

Parameters

If you define one or multiple parameters for a script, you have the option to turn over values when running a script.

Parameters can be used with their name as local Variables inside a Script.

Define Parameter Names

scripts-parameters_zoom70

Use the Parameters field in the script editor to define the parameters for the selected script.
or

Select a script in the inspector and enter the parameters there.

informationDefine and use
Multiple Parameter names must be separated by a comma followed by a space character.
Parameter names can be used in the same way like local variables inside a Script

 

Example for Parameters and their use as local Variable inside a Script:
Script 1 has the parameters "ml1", "ml2" and "time" assigned

// Set Mixlevel of Playback 2 to value 0
Playback2.MixLevel.Value = 0
 
//Fade out Playback1 to value of Parameter ml1. Use Fadetime of Parameter 'time'
Playback1.MixLevel.FadeValue ml1,time
 
//Go to Cue 2 into Playback 2, start Playback and fade to value of Parameter 'ml2'. Use Fadetime of Parameter 'time'
Playback2.GotoCue 2
Playback2.Play
Playback2.MixLevel.FadeValue ml2,time

Run a Script with Parameter Values

When you run a script with parameters, use the following syntax in every script command field:

ScriptName Parameter1,Parameter2,Parameter3

 
For example the script above with 3 parameters "ml1, "ml2" and "time":

Script1 0,1,5
//Assigns the Values 0 for parameter 'ml1', 1 for 'ml2' and 5 for parameter 'time'

 

productivityFor testing purposes, you can add parameters directly from inside the script editor by using the button: Run 'Script' with prompt .
A popup window opens, where you can add values for all expected parameters.