Skip to main content

Context Overview

The context object is passed into edit tasks and dialog flows. Its availability depends on whether the script is in prepareEdit() or performEdit().

Properties

PropertyprepareEditperformEditDescription
context.editorxActive editor surface.
context.functionsxActive edit-function surface.
context.iteratorxIterate selected events.
context.mainTrackListxTrack-list surface. Also accessible as context.trackList (same reference).
context.parametersDialog parameter surface.

Methods

See methods for full documentation of each method.

MethodprepareEditperformEditDescription
context.contains(name)Check whether a named attribute exists.
context.countAttributes()Count context properties and attributes in the current phase.
context.getArguments()Read task arguments.
context.getAttribute(name)Get a context attribute or property value by name.
context.getAttributeName(index)Get a context attribute name by index.
context.getAttributeValue(index)Get a context attribute value by index.
context.isSilentMode()Check whether the script is running in silent mode.
context.runDialog(name, pkgID)xOpen a dialog from the package's skin.xml. Must be returned from prepareEdit.
context.setAttribute(name, value)Set a context attribute by name.