Scripts; Using Scripts With Mbox - PRG MBOX User Manual

Hide thumbs Also See for MBOX:
Table of Contents

Advertisement

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 prefix, just like other content on the server. Scripts must be placed in the
/Mbox/plugins/scripts folder. AppleScripts must use the file extension '.scpt' and shell scripts must use the file
extension '.sh'
Scripts are considered metadata within the Mbox Content Management system. Beginning with Mbox v3.9, metadata
files can be synced along with content (texture and object) files.
IMPORTANT! Scripts must be created outside Mbox using another application. They should always be tested outside
Mbox first, 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 files with the. scpt extension by default. The file can be saved as a text file (using
either Mac or Unix line endings), but the file 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 first, then copy and
paste the text into a text editor. For more complex scripts, the commands must be created in the text editor first and
then tested.
IMPORTANT! Shell scripts must be converted to be executable before being used in Mbox.
To save a script as a text file and make it an executable shell script, do the following:
Step 1.
Save the script as a file using the file 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 file onto the Terminal window.
Step 3.
Press [return] on the keyboard. This step makes the file executable.
Step 4.
Double-click on the file to run the script for testing.
001.Apple Script.scpt or 123.Shell Script.sh
MBOX® USER MANUAL
97

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents