InDesign2026
API 21.5.1.73
Object

BackgroundTask

background task

Hierarchy

Application

BackgroundTask

Properties

NameType AccessDescription
2 TaskAlertType enumerators[] | Strings[] readonly The alerts encountered while running this task object. Can return: Array of Array of 2 TaskAlertType enumerators or Strings.
String readonly The document name on which this task operates.
EventListeners<EventListener> readonly A collection of event listeners.
Events<Event> readonly A collection of events.
Number readonly The unique ID of the BackgroundTask.
Number readonly The index of the BackgroundTask within its containing object.
Boolean readonly Returns true if the object specifier resolves to valid objects.
String readonly The name of the BackgroundTask.
Application readonly The parent of the BackgroundTask (a Application).
Number readonly Progress information for this task.
Object read/write A property that allows setting of several properties at the same time.
TaskState
readonly The current status of this task object.

Methods

EventListener

Adds an event listener.

eventType String The event type.
handler File | JavaScriptFunction The event handler. Can accept: File or JavaScript Function.
captures? Boolean This parameter is obsolete.
void

Cancels the specified background task.

BackgroundTask[]

Resolves the object specifier, creating an array of object references.

→ Varies

Queries for a particular property in the task metadata.

name String The task property being queried
Boolean

Removes the event listener.

eventType String The registered event type.
handler File | JavaScriptFunction The registered event handler. Can accept: File or JavaScript Function.
captures? Boolean This parameter is obsolete.
String

Generates a string which, if executed, will return the BackgroundTask.

String

Retrieves the object specifier.

TaskState

Waits for the task to finish.

Object of 3

Properties elsewhere that hold a BackgroundTask.

Parameter of 3

Method parameters that accept a BackgroundTask.

Return 57

Methods that return a BackgroundTask.

BackgroundTask.getElements()BackgroundTasks.[]()BackgroundTasks.anyItem()BackgroundTasks.everyItem()BackgroundTasks.firstItem()BackgroundTasks.item()BackgroundTasks.itemByID()BackgroundTasks.itemByName()BackgroundTasks.itemByRange()BackgroundTasks.lastItem()BackgroundTasks.middleItem()BackgroundTasks.nextItem()BackgroundTasks.previousItem()Button.asynchronousExportFile()Character.asynchronousExportFile()CheckBox.asynchronousExportFile()ComboBox.asynchronousExportFile()Document.asynchronousExportFile()EPS.asynchronousExportFile()EPSText.asynchronousExportFile()EndnoteTextFrame.asynchronousExportFile()FlexObject.asynchronousExportFile()FormField.asynchronousExportFile()Graphic.asynchronousExportFile()GraphicLine.asynchronousExportFile()Group.asynchronousExportFile()HtmlItem.asynchronousExportFile()Image.asynchronousExportFile()ImportedPage.asynchronousExportFile()InsertionPoint.asynchronousExportFile()Line.asynchronousExportFile()ListBox.asynchronousExportFile()MediaItem.asynchronousExportFile()Movie.asynchronousExportFile()MultiStateObject.asynchronousExportFile()Oval.asynchronousExportFile()PDF.asynchronousExportFile()PICT.asynchronousExportFile()PageItem.asynchronousExportFile()Paragraph.asynchronousExportFile()Polygon.asynchronousExportFile()RadioButton.asynchronousExportFile()Rectangle.asynchronousExportFile()SVG.asynchronousExportFile()SignatureField.asynchronousExportFile()Sound.asynchronousExportFile()SplineItem.asynchronousExportFile()Story.asynchronousExportFile()Text.asynchronousExportFile()TextBox.asynchronousExportFile()TextColumn.asynchronousExportFile()TextFrame.asynchronousExportFile()TextStyleRange.asynchronousExportFile()WMF.asynchronousExportFile()Word.asynchronousExportFile()XMLElement.asynchronousExportFile()XmlStory.asynchronousExportFile()