Testing And Troubleshooting - Adobe 65009963 Scripting Manual

After effects cs4
Table of Contents

Advertisement

Overview
Alternatively, you can specify the location of the JSX file to be executed. For example:
a ft er f x . e x e -r c : \ m y D o c u m e n t s \ Sc r i p t s \ y o u r AE S criptH ere. jsx
a f t e r f x . e x e -r " c : \ m y D o c u m e n t s \ Sc r i p ts \ S c r i pt N am e w it h S p ac e s .j sx "
How to include After Effects scripting in an AppleScript (Mac OS)
Following are three examples of AppleScript scripts that will send an existing JSX file containing an After
Effects script to the application without using the After Effects user interface to execute the script.
In the first example, you copy your After Effects script directly into the Script Editor and then run it. The script
text appears within quotation marks following the DoScript command, so internal quotes in the script must
be escaped using the backslash escape character, as follows:
t el l ap p l ic a ti on "A dob e Af ter Eff ec t s C S3 "
D o S c r i p t " a l e r t( \ " Y o u j u s t s e n t a n aler t t o Af te r Ef fe ct s \")"
en d t ell
Alternatively, you could display a dialog box asking for the location of the JSX file to be executed, as follows:
s et the F i le to c h oos e f i le
t el l ap p l ic a ti on "A dob e Af ter Eff ec t s C S3 "
D oS c ri pt th eF i l e
en d t ell
Finally, this script is perhaps most useful when you are working directly on editing a JSX script and want to
send it to After Effects for testing or to run. To use it effectively you must enter the application that contains
the open JSX file (in this example it is TextEdit); if you do not know the proper name of the application, type
in your best guess to replace "TextEdit" and AppleScript prompts you to locate it.
Simply highlight the script text that you want to run, and then activate this AppleScript:
( *
T h i s s c r i p t s e n d s t he c u r r e n t s e l e c t i o n t o A ft er E f f e c t s a s a s c r i p t .
* )
t e l l ap p l ic a ti o n " T e xt E d i t"
s e t the _ sc r ip t to s e l e c t i o n as te x t
en d t ell
t el l ap p l ic a ti on "A dob e Af ter Eff ec t s C S3 "
a ct i vat e
D o S c r i pt th e _ s cr ip t
en d t ell
For more information on using AppleScript, check out Matt Neuberg's AppleScript: the Definitive Guide
(O'Reilly & Associates) or Sal Soghoian's AppleScript 1-2-3 (Peachpit Press).

Testing and troubleshooting

Any After Effects script that contains an error preventing it from being completed generates an error message
from the application. This error message includes information about the nature of the error and the line of
the script on which it occurred.
Testing and troubleshooting
8
8

Advertisement

Table of Contents
loading

This manual is also suitable for:

Creative suite 3 after effects

Table of Contents