
29
7.9 - Custom Scripting Suggestions
Before you embark on your scripting expedition take the time to map out the requirements in a
spread sheet or note pad. Spending a bit of time in the planning phase can save you some
headaches later on and will at least make it easier to stay focused on coding once you start getting
deep into it. Also writing out the requirements, (i.e. Turn the xx ON when yy AND zz are true
OR nn is NOT true) can be helpful for scripting complex logic statements.
The GP Scripting language is a cross between the C and Basic programming languages. Correct
syntax is essential, and is a common source of compiler errors so be sure to carefully check case
sensitive spelling, braces and parentheses placement, etc. whenever you get a compiler error.
7.10 - Scripting Router Control
By now you have been exposed to many of the router control functions available. You can review
in detail the complete set of Router Functions available by opening the Router Functions section
of the Help file. There you will find information on the using the following:
Router Function
Description
Connect
Makes a cross-point connection in the router.
Disconnect
Breaks a cross-point connection in the router.
Lock
Locks a cross-point connection in the router.
Unlock
Unlocks a cross-point connection in the router.
Connection
Queries a destination to find out what source is connected to it.
Locked
Queries a destination to find out if it is locked.
Fire_salvo
Fires a pre-defined Salvo - requires the Salvo ID number.
Find_src
Returns the source signal ID number when you know the source name and
location.
Find_dst
Returns the destination signal ID when you know the dest name and location.
Find_salvo
Returns a Salvo ID number when you know the Salvo name.
Lio_get
Returns the current value – 1 or 0 – of a logic signal in the router.
Lio_set
Sets the value – 1 or 0 – of a logic signal in the router.
7.11 -
Scripting Surface Control
Control Surfaces may be directly controlled using a built in surface script functions. You can find
detailed information on these functions in the Help file’s “Surface Functions” section.
Surface Functions can be divided into two groups. The first set of basic functions control the
rudimentary tasks of taking a surface preset, getting a fader’s ON status, and turning a fader
channel ON. The second “advanced” set allows you to utilize the Automation Controller protocol
built into each surface.
7.12 - Basic Surface functions
These functions may be used directly in your script and require a minimum amount of scripting
knowledge.
surf_take_preset – takes an “Event’ stored on a surface. The surface ID parameter is an index into
the surface list entered in the Device Properties form.
surf_get_ input_on – returns the channel ON status; 1= ON, 0 = OFF.
surf_set_input_on – turns a channel ON or OFF.