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.
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.
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/devnet/aftereffects.
To exchange scripts and other useful tools with other After Effects users, visit the After Effects Exchange on the Adobe website at www.adobe.com/go/learn_ae_exchange.
Jeff Almasol provides a collection of useful scripts on his website: www.adobe.com/go/learn_ae_redefineryhome.
Dan Ebberts provides scripting tutorials and useful scripts on his website: www.adobe.com/go/learn_ae_danscripting.
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.
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.
You can run a script by calling afterfx.exe from the command line, with the script as an argument. This does not open a new instance of the After Effects application; it runs the script in the existing instance.Todd_Kopriva said on Dec 29, 2007 at 1:05 PM :
Use the -r switch and the full path of the script to run. Example:
afterfx -r c:\script_path\save_and_increment.jsx
You can use this---together with the software that comes with a customizable keyboard---to bind the invocation of a script to a particular key combination.
Jeff Almasol provides a script that creates a panel that makes running scripts much more convenient:Todd_Kopriva said on Dec 29, 2007 at 1:13 PM :
http://www.redefinery.com/ae/view.php?item=rd_ScriptLauncher
A similar extension is the LaunchPad script, which allows you to create buttons with which to run scripts. This makes running commonly used scripts very quick and easy.
http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&loc=en_us&extid=1242019
Jeff Almasol provides a script that creates a simple console panel. The console panel includes a text area in which you can enter JavaScript commands that will be evaluated. There is no capturing of errors or messages — this console is just a simple way of entering commands without having to create a script first.Todd_Kopriva said on Dec 29, 2007 at 1:28 PM :
http://www.redefinery.com/ae/view.php?item=rd_SimpleConsole
Jeff Almasol provides a set of scripting utilities (such as useful functions) that you can use to make creating your own scripts much easier:
http://www.redefinery.com/ae/view.php?item=rd_utilities
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/en_US/AfterEffects/8.0/WS625657CC-5CCA-41ef-A1C7-055D2557AE56.html
Comments
Comments are no longer accepted for After Effects CS3. After Effects CS4 is the current version. To discuss After Effects CS3, please use the Adobe forum.