About scripting commands, The scripting user interface – Apple DVD Studio Pro 4 User Manual

Page 480

Advertising
background image

Scripts use GPRMs as temporary storage, or “scratch pads,” while executing their
commands. DVD Studio Pro provides access to eight 16-bit GPRM registers, designated
GPRM 0 through GPRM 7 (though they can be renamed). DVD Studio Pro includes the
ability to partition seven of these registers into multiple smaller registers. For example,
you can partition GPRM3 into four 4-bit registers. Each register is independent of the
others, and all are cleared whenever a disc is inserted into the DVD player. The registers
can be used as storage locations or as countdown timers.

In contrast, SPRMs have rigidly defined functions. There are 24 of them, designated SPRM
0 through SPRM 23. See

System Parameter Register Memories Details

for a detailed listing

of their functions.

Scripts spend a lot of time copying values from an SPRM to a GPRM, extracting information
from the values (for example, determining the language setting), and then acting on that
information (selecting the proper audio stream to play). Extracting the information can
be challenging, requiring a bit of skill and programming knowledge.

About Scripting Commands

You can choose from ten scripting commands when building your script. Each scripting
command has its own set of controls that fit the command’s function. Each script can
contain up to 124 commands, or operations. Depending on how you configure the
scripting command, it might use up to 16 of the 124 commands. The top of the Script
Inspector shows the number of commands used and available. A dialog appears to warn
you if you create a script with too many commands, and the Script Inspector shows the
commands used and available values in red, with a negative number for the Commands
Remaining value.

Each scripting command creates a command line that appears in the Script Editor. You
are provided with a variety of tools to rearrange the order of the command lines in the
script, which is important because the command lines are executed in order (though it
is possible for a command line to jump to any other command line in the script).

The Scripting User Interface

Scripts appear in the Outline and Graphical tabs. Double-clicking an existing script or
clicking the Script tab displays the Script Editor and the Script Inspectors. You use the
Script tab to add and remove commands, as well as modify their order. You use the Script
Inspectors to configure the commands, choosing the actual command to use and setting
its parameters. See the following for details on the items that make up the scripting user
interface:

About the Script Tab

About the Script Inspector

About the Script Command Inspector

480

Chapter 20

Creating Scripts

Advertising