HOW TO: Trigger AppleScripts with GPICommander

To interact with a Softron application using GPICommander, you have 2 options:

With the direct integration: you just have to connect the GPICommander box to the computer and go to the preferences of the application to set it up. This is the easiest way. Here is a list of the Softron applications that have a direct integration with GPICommander:

MovieRecorder,

OnTheAir Video Express,

OnTheAir Video,

OnTheAir Node (but only to control the outputs, can not be controlled),

Multicam Logger

With AppleScripts. This is more flexible as it means you can also control other Applications than the ones from Softron. You could also control multiple applications with just one GPI trigger. But of course you have to know how AppleScript works, but we provide sample scripts, and it is relatively easy to work with. This of course will only works with applications that are AppleScriptable. The Softron applications that can be controlled with AppleScripts are:

MovieRecorder,

Multicam Logger,

OnTheAir Video,

OnTheAir CG,

OnTheAir Studio,

OnTheAir Switch,

and the GPICommander application itself

Installing the GPICommander Application

As said above, if you want to trigger AppleScripts with the GPICommander box, you will need to install the GPICommander application on the computer on which the GPICommander box is installed. The GPICommander software is the one that will be triggering the AppleScript and it needs to be running. Note that there are ways to control remote computers with AppleScripts, so you could be controlling different computers from one.

IMPORTANT NOTE: If you are updating GPICommander, and have already customized your Actions, make sure to disable the installation of the Actions folder, so the installer does not replace your AppleScripts.

Configuring the "Actions"

In the GPI Commander folder you will see that there is the application GPI Commander and a folder named “Actions”. In this Actions folder, there are 24 AppleScripts named Input 1, Input 2, Input3,...

As you can guess, the way it works is as easy as:

when the GPICommander Input 1 state changes status, the AppleScript named "Input 1" will be triggered

when the GPICommander Input 2 state changes status, the AppleScript named "Input 2" will be triggered

...

You then need to customize the AppleScripts so that they do what you need.

Customizing AppleScripts

Working with AppleScripts is relatively easy and with our applications we provide sample AppleScripts that you can use to start with. There is also a lot of documentation online.

With the sample "inputs" AppleScripts, you can see that there are two parts of the AppleScript. The first part is triggered when the status of the input changes from off to on:

And the second part is changed when the status of the input changes from on to off:

Note that you can leave empty any of the two parts if you want to trigger an AppleScript only when the value changes from off to on for example.

You can see that there are two values that can be retrieved:

value: allows you to know what the state of the input is (you can get the value of any input)

serial: allows you to know the serial of the device. As there can be multiple GPICommander devices connected on the Mac, it is best to know which one you are talking to.