29
JavaScript Reference
Application object
29
Description
When true (the default), After Effects attempts to display a dialog box that allows you to save the current
project if an error causes the application to quit unexpectedly. Set to false to suppress this dialog box and quit
without saving.
Type
Boolean; read/write.
Application scheduleTask() method
a p p . s c h e d u le T a s k (
s t r i n g T o E x e c u t e , d e l a y, r e p e a t
)
Description
Schedules the specified JavaScript for delayed execution.
Parameters
Returns
Integer, a unique identifier for this task, which can be used to cancel it with
a p p . c a n c e l T a s k ( )
.
Application setMemoryUsageLimits() method
a p p . s e t M e m o r y U s a g e L i m i t s (
i m a g e C a c h e P e r c e n t a g e , m a x i m u m M e m o r y P e r c e n t a g e
)
Description
Sets memory usage limits as in the Memory & Cache preferences area. For both values, if installed RAM is less
than a given amount (
n
gigabytes), the value is a percentage of the installed RAM, and is otherwise a
percentage of
n
. The value of
n
is: 2 Gb for Win32, 4 Gb for Win64, 3.5 Gb for Mac OS.
Parameters
Returns
Nothing.
Application setSavePreferencesOnQuit() method
a p p . s e t S a v e P r e f e r e n c e s O n Q u i t (
d o S a v e
)
Description
Set or clears the flag that determines whether preferences are saved when the application is closed.
s t r in g T o E x e c u t e
A string containing JavaScript to be executed.
d e l a y
A number of milliseconds to wait before executing the JavaScript. A floating-point value.
r e p e a t
When true, execute the script repeatedly, with the specified delay between each execution. When false
the script is executed only once.
i m a g e C a ch e P e r c e n t a g e
Floating-point value, the percentage of memory assigned to image cache.
m a x i m u m M e m o r y P e r c e n t a g e
Floating-point value, the maximum usable percentage of memory.
Summary of Contents for 65009963 - After Effects CS4
Page 1: ...SCRIPTING GUIDE...