Variables are small stores used to keep track of various types of data. These data stores can be easily recalled and used in CueScript in any context.
There are a plethora of situations where variables can be helpful and multiple ways in which they can be used.
This article is here to help you determine what those situations might be and the multitude of ways they can be utilized.
Types of Variables
These variables are pre-set and used to manipulate system settings and properties.
An example of a System Variable might be
audio.volume which is used to set CueServer's system output volume.
These variables are defined by the user and are used to store small pieces of data, such as strings, numbers, channel ranges, commands and much more.
An example of a User Variable might be
fixtureOne and used to store the value of
ch1>3. The Use for this might be to recall a fixture's channel range quickly without the need to remember actual channel addresses.
These variables are typical variables definded by the user, but with the non-volatile modifier.
Non-Volatile variables persist through reboots and show unloads, where standard variables are erased on such events.
Using Variables in CueScript
Setting a variable in CueScript is a breeze.
Use either of the three methods below to set a variable.
Method 1: Using the Equals Operator
Method 2: Using the Set Command
Method 3: Using CueServer Studio Interface
Recalling a variable in CueScript is even easier than setting one.
Back-Ticks can be used to recall a variable's value inline and execute it's contents as a CueScript Command.
Try it Out!
Use the tool below to test out some example scenarios. Provide a variable name and value, then use the CueScript box to test out different uses and how they are interpreted by CueServer.
Variables in CueScript are used with
'Single Quotations', or
Enter a variable and value below, then use the variable in the command box to simulate the interpretation of that command.
(Alternatively, use one of the preset example buttons above)
How it's Interpreted:
Complete Form for interpretation