97
MBOX® USER MANUAL
SCRIPTS
Using Scripts with Mbox
Mbox can be used to trigger custom scripts. These scripts can be either AppleScripts or shell scripts. The two types of
scripts are created differently, but both types can be triggered identically.
Scripts are numerically indexed using an 8-bit prex, just like other content on the server. Scripts must be placed in the
/Mbox/plugins/scripts folder. AppleScripts must use the le extension ‘.scpt’ and shell scripts must use the le
extension ‘.sh’
001.Apple Script.scpt or 123.Shell Script.sh
Scripts are considered metadata within the Mbox Content Management system. Beginning with Mbox v3.9, metadata
les can be synced along with content (texture and object) les.
IMPORTANT! Scripts must be created outside Mbox using another application. They should always be tested outside
Mbox rst, and then tested within Mbox before use in show situations.
AppleScripts
Use the AppleScript Editor application to create and test AppleScripts.
AppleScripts can be used to control many aspects of the computer and other applications running on the computer.
AppleScripts can also be used for external control, but require the script to trigger some other application for that
external control.
CAUTION! In some cases, launching and performing tasks in some other application while Mbox is running, may
negatively affect Mbox performance.
The AppleScript editor saves script les with the. scpt extension by default. The le can be saved as a text le (using
either Mac or Unix line endings), but the le extension must be changed to .scpt manually before using the script in
Mbox.
Shell Scripts
For simple scripts (single commands), use the Terminal application to test the commands and syntax rst, then copy and
paste the text into a text editor. For more complex scripts, the commands must be created in the text editor rst and
then tested.
IMPORTANT! Shell scripts must be converted to be executable before being used in Mbox.
To save a script as a text le and make it an executable shell script, do the following:
Step 1. Save the script as a le using the le extension ‘.sh’
Step 2. Open a Terminal window and type “chmod 755 “ (make sure to include the trailing space) and then drag and
drop the saved .sh le onto the Terminal window.
Step 3. Press [return] on the keyboard. This step makes the le executable.
Step 4. Double-click on the le to run the script for testing.