Application
Properties
null if no viewers are open.app.project.gpuAccelType to set the value for Project Settings > Video Rendering and Effects > Use.false (the default), rendering proceeds as normal. Set to true to disable rendering as if Caps Lock were turned on.true, suppresses the progress dialog that would otherwise be shown while a script is running.-r or -s command line flag causes the application to run a script (from a file or from a string, respectively). If this attribute is set to true, After Effects will exit after the script is run; if it is false, the application will remain open. This attribute only has an effect when After Effects is run from the Windows command line. It has no effect in Mac OS.getAppTheme can be set to (light, dark, darkest).getAllowedAppThemes.true if After Effects is running as a render engine.true if the Watch Folder dialog box is currently displayed and the application is currently watching a folder for rendering.Language enumeration value corresponding to the language After Effects is currently running in.true, causes an error to be reported if a frame of footage referenced by the project is missing.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."After Effects" or "After Effects (Beta)".Instance Methods
activate
Returns: boolean
Since: 27.0
Opens the application main window if it is minimized or iconified, and brings it to the front of the desktop.
beginSuppressDialogs
Returns: boolean
Since: 27.0
Begins suppression of script error dialog boxes in the user interface. Use app.endSuppressDialogs() to resume the display of error dialogs.
beginUndoGroup
Returns: boolean
Since: 27.0
Marks the beginning of an undo group, which allows a script to logically group all of its actions as a single undoable action (for use with the Edit > Undo/Redo menu items). Use the app.endUndoGroup() method to mark the end of the group. beginUndoGroup() and endUndoGroup() pairs can be nested. Groups within groups become part of the larger group, and will undo correctly. In this case, the names of inner groups are ignored.
Parameters
endSuppressDialogs
Returns: boolean
Since: 27.0
Ends the suppression of script error dialog boxes in the user interface. Error dialogs are displayed by default;call this method only if app.beginSuppressDialogs() has previously been called.
Parameters
true, errors that have occurred following the call to beginSuppressDialogs() are displayed in a dialog box.endUndoGroup
Returns: boolean
Since: 27.0
Marks the end of an undo group begun with the app.beginUndoGroup() method. You can use this method to place an end to an undo group in the middle of a script, should you wish to use more than one undo group for a single script. If you are using only a single undo group for a given script, you do not need to use this method; in its absence at the end of a script, the system will close the undo group automatically. Calling this method without having set a beginUndoGroup() method yields an error.
endWatchFolder
Returns: boolean
Since: 27.0
Ends Watch Folder mode.
executeCommand
Returns: boolean
Since: 27.0
Menu Commands in the GUI application have an individual ID number, which can be used as the parameter for this method. For some functions not included in the API this is the only way to access them. The app.findMenuCommandId() method can be used to find the ID number for a command.
Parameters
findMenuCommandId
Returns: number
Since: 27.0
Menu Commands in the GUI application have an individual ID number, which can be used as a parameter for the app.executeCommand() command. For some functions not included in the API this is the only way to access them. It should be noted that this method is not reliable across different language packages of AE, so you'll likely want to find the command ID number during development and then call it directly using the number in production.
Parameters
log
Returns: boolean
Since: 27.0
Writes a message to the application's log, optionally tagged with a category.
Parameters
newProject
Returns: Project
Since: 27.0
Creates a new project in After Effects, replicating the File > New > New Project menu command. If the current project has been edited, the user is prompted to save it. If the user cancels out of the Save dialog box, the new project is not created and the method returns null. Use app.project.close(CloseOptions.DO_NOT_SAVE_CHANGES) to close the current project before opening a new one.
newTeamProject
Returns: boolean
Since: 27.0
Creates a new Team Project, After Effects's cloud-based collaborative project format.
Parameters
open
Returns: Project
Since: 27.0
Opens a project.
Parameters
openFast
Returns: Project
Since: 27.0
Opens a project faster than app.open() by skipping some checks.
Parameters
openTeamProject
Returns: boolean
Since: 27.0
Opens an existing Team Project.
Parameters
openTemplate
Returns: Project
Since: 27.0
Opens a project from an After Effects project template (.aet) file.
Parameters
parseSwatchFile
Returns: { majorVersion: number; minorVersion: number; values: number[] }
Since: 27.0
Loads color swatch data from an Adobe Swatch Exchange (ASE) file.
Parameters
pauseWatchFolder
Returns: boolean
Since: 27.0
Pauses or resumes the search of the target watch folder for items to render.
Parameters
true to pause, false to resume.purge
Returns: boolean
Since: 27.0
Purges unused data of the specified types. Replicates the Purge options in the Edit menu.
Parameters
PurgeTarget.ALL_CACHES, PurgeTarget.ALL_MEMORY_CACHES, PurgeTarget.UNDO_CACHES, PurgeTarget.SNAPSHOT_CACHES, PurgeTarget.IMAGE_CACHES.quit
Returns: boolean
Since: 27.0
Quits the After Effects application.
restart
Returns: boolean
Since: 27.0
Restarts the After Effects application.
scheduleTask
Returns: number
Since: 27.0
Schedules the specified JavaScript for delayed execution.
Parameters
true, execute the script repeatedly, with the specified delay between each execution. When false, the script is executed only once.setMemoryUsageLimits
Returns: boolean
Since: 27.0
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 32-bit Windows, 4 GB for 64-bit Windows, 3.5 GB for Mac OS.
Parameters
setMultiFrameRenderingConfig
Returns: boolean
Since: 27.0
Calling this function from a script will set the Multi-Frame Rendering configuration for the next render. After execution of the script is complete, these settings will be reset to what was previously set in the UI.
Parameters
true to enable Multi-Frame Rendering.mfr_on is set to false, pass in 100.setSavePreferencesOnQuit
Returns: boolean
Since: 27.0
Set or clears the flag that determines whether preferences are saved when the application is closed.
Parameters
true, preferences saved on quit, when false they are not.themeColor
Returns: number[]
Since: 27.0
Deprecated and no longer available; calling this always throws an error directing you to use getAppTheme, getUseReducedContrast, and getAllowedAppThemes instead.
Parameters
watchFolder
Returns: boolean
Since: 27.0
Starts a Watch Folder (network rendering) process pointed at a specified folder.