Application related methods


static, readonly hasFilesAndNetworkAccess :boolean

Has scripting file and network authorization

static, readonly version :DuVersion

Informations about the version of after effects.


static askFilesAndNetworkAccess(showAlertopt, messageopt) → {boolean}

Asks the user to check the file and network security pref if not already set. Opens the general prefrences of After Effects.
Name Type Attributes Default Description
showAlert boolean <optional>
true Wether to display an alert before opening the preferences
message string <optional>
The Duduf After Effects scripting framework needs to be allowed to write files\nPlease, check the box called 'Allow Scripts to write files...' in the general preferences of After Effects. The message to display in the alert.
boolean - Wether the preference has been set

static beginUndoGroup(groupName, autoCloseopt)

Begins an undoGroup.
Automatically prepend the group name with the script name.
Using this method is safer than the native one, as DuAEF will try to avoid opening several undo groups at once.
The group name is translatable.
Name Type Attributes Default Description
groupName string The name of the Undo Group.
autoClose boolean <optional>
true By default, DuAEF will close any previously opened undogroup (which has a different name) to prevent any error.
Set this to false in order to ignore this new group beginning and keep the previously opened one.

static copy()

Copies the selection (runs the copy menu command)
Copies the selection with property links (runs the copy menu command)
Only on versions of After Effects greater than 11.0 (CS6)
On CS6 and below, a standard copy will be done.

static cut()

Cuts the selection (runs the cut menu command)

static duplicate()

Duplcates the selection (runs the duplicate menu command)

static endUndoGroup()

Ends an undoGroup.
Using this method is safer than the native one, as DuAEF will try to avoid opening several undo groups at once.

static executeCommand(commandID)

Runs app.executeCommand in a safer way, taking care of undogroups.
Name Type Description
commandID int | string The ID of the command as given by app.findMenuCommandID(), or if it is a string, the name of the command.

static getAEVersionName(versionAsFloatopt) → {string}

Gets the public name of a version of After Effects (like CC2015.3 for version 13.8)
Name Type Attributes Description
versionAsFloat float <optional>
The version as a float. If not provided, will default to the current version of the running instance of After Effects.
string - The version name.

static isAutoSaveFolder(folder) → {boolean}

Checks if the Folder is an Auto-Save folder
Name Type Description
folder Folder | string The folder or path to check
boolean - true if the folder is an auto-save folder

static openScriptUIPanel(panelScriptName)

Opens a ScriptUI Panel if it is installed, or displays an alert otherwise.
Name Type Description
panelScriptName string The Script name of the panel "script.jsx"

static paste()

Pastes the selection (runs the paste menu command)

static undo()

Undoes (runs the undo command)