beautypg.com

Work with scripts – Adobe After Effects CS3 User Manual

Page 50

background image

AFTER EFFECTS CS3

User Guide

45

Plug-ins compiled for the Macintosh PowerPC processor architecture do not run natively on Macintosh computers
that use Intel processors. To use plug-ins compiled for the PowerPC processor architecture, you can run After Effects
CS3 under Rosetta. Rosetta is a software translator for Mac OS X that runs applications for PowerPC processors on
Intel processors. As with any application running in an emulation environment, performance is not as good as it
would be in the native environment.

See also

“Introduction to Camera Raw” on page 86

“About effects” on page 348

Work with scripts

A script is a series of commands that tells an application to perform a series of operations. You can use scripts in most
Adobe applications to automate repetitive tasks, perform complex calculations, and even access some functionality
not directly exposed through the graphical user interface. For example, you can direct After Effects to reorder the
layers in a composition, find and replace source text in text layers, or send an e-mail message when rendering is
complete.

After Effects scripts use the Adobe ExtendScript language, which is an extended form of JavaScript, similar to
ActionScript. ExtendScript files have the .jsx file-name extension.

When After Effects starts, it searches the Scripts folder for scripts to load. Loaded scripts are available from the File >
Scripts menu. If you edit a script while After Effects is running, you must save your changes for the changes to be
applied. If you place a script in the Scripts folder while After Effects is running, you must restart After Effects for the
script to appear in the Scripts menu, though you can immediately run the new script using the Run Script File
command.

After Effects provides several prewritten scripts to assist you in performing common tasks, and to provide a basis for
you to modify and create your own scripts.

Run the sample script DemoPalette.jsx to get an idea of what sorts of things you can do with scripts. For example,
the Reverse Layer Order script makes reversing the stacking order of layers in the Timeline panel much easier than

reordering the layers manually.

You can write your own scripts for use in After Effects by using the script editor, which is part of the ExtendScript
Toolkit. The ExtendScript Toolkit provides a convenient interface for creating, debugging, and testing your own
scripts.

Note: Scripts created in After Effects 6.5 or earlier that use an index to access a property may not work as expected in
After Effects 7 or later. To resolve this issue, modify your scripts so that they contain equivalent expressions accessing
properties by name.

The default is for scripts to not be allowed to write files or send or receive communication over a network. To allow
scripts to write files and communicate over a network, choose Edit > Preferences > General (Windows) or After
Effects > Preferences > General (Mac OS), and select the Allow Scripts To Write Files And Access Network option.

To run a loaded script, choose File > Scripts > [script name]

To run a script that has not been loaded, choose File > Scripts > Run Script File, locate and select a script, and click
Open.

To start the script editor, choose File > Scripts > Open Script Editor.