| After Effects CS4 |
|
|
ScriptsA 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 use 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 filename extension. For a complete description of the scripting capabilities available with After Effects, see the After Effects Scripting Guide on the Adobe website at www.adobe.com/go/learn_ae_devcenter. Loading and running scriptsWhen 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. Scripts in the ScriptUI Panels folder are available from the bottom of the Window menu. If a script has been written to provide a user interface in a dockable panel, the script should be put in the ScriptUI folder. ScriptUI panels work much the same as the default panels in the After Effects user interface. Note: 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.
Jeff Almasol provides a set of scripts that includes the Launch Pad script, which creates a docking panel from which you can run any other scripts that you have installed. The same package of Jeff’s scripts includes Keyed Up, a script with which you can modify keyboard shortcuts. For information, see the Adobe After Effects Exchange website: www.adobe.com/go/learn_ae_jeffscriptswithkeyedup. Scripts included with After EffectsAfter 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 Demo Palette.jsx
to get an idea of what sorts of things you can do with scripts.Writing and modifying scriptsYou 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. Sometimes, all that you need to do is make a slight modification to an existing script to make it do what you want; such slight modifications can often be performed with little knowledge of computer programming and scripting languages.
This tutorial on the AE Enhancers forum leads the reader step by step through the creation of a script: www.adobe.com/go/learn_ae_aeenhancersgettingstarted. Jeff Almasol provides a set of scripting utilities—such as useful functions—to facilitate the creation of your own scripts: www.adobe.com/go/learn_ae_jeffscriptutilities. Where to find additional useful scriptsTo exchange scripts, projects, and other useful items with other After Effects users, visit the After Effects Exchange on the Adobe website: www.adobe.com/go/learn_ae_exchange. Dan Ebberts provides scripting tutorials and useful scripts on his website: www.adobe.com/go/learn_ae_danscripting. Lloyd Alvarez provides a collection of useful scripts on his website: www.adobe.com/go/learn_ae_lloydaescripts. The AE Enhancers forum provides example scripts and useful information about scripting (as well as expressions and animation presets) in After Effects: www.adobe.com/go/learn_ae_aeenhancershome. Jeff Almasol provides a collection of useful scripts on his website: www.adobe.com/go/learn_ae_redefineryhome. |