Adobe InCopy CS5 (7.0) Object Model JS: BackgroundTask

InCopy CS5

Class

BackgroundTask

 background task

QuickLinks

addEventListener, cancelTask, getElements, queryProperty, removeEventListener, toSource, toSpecifier, waitForTask

Hierarchy

Application
BackgroundTask
Event | EventListener | MutationEvent

Properties

PropertyTypeAccessDescription
alerts Array of
Array of 2 TaskAlertType
Strings
readonlyThe alerts encountered while running this task object. Can return: Array of Array of 2 TaskAlertType enumerators or Strings.
documentNamestring readonlyThe document name on which this task operates.
eventListenersEventListeners readonlyA collection of event listeners.
eventsEvents readonlyA collection of events.
idnumber readonlyThe unique ID of the BackgroundTask.
indexnumber readonlyThe index of the BackgroundTask within its containing object.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
namestring readonlyThe name of the BackgroundTask.
parentApplication readonlyThe parent of the BackgroundTask (a Application).
percentDonenumber readonlyProgress information for this task.
propertiesObject r/wA property that allows setting of several properties at the same time.
statusTaskState:
TaskState.QUEUED
TaskState.RUNNING
TaskState.WAITING
TaskState.CANCELLING
TaskState.COMPLETED
TaskState.CANCELLED
readonlyThe current status of this task object.

Methods

Instances

EventListener addEventListener (eventType: string, handler: varies[, captures: bool=false])
Adds an event listener.

ParameterTypeDescription
eventTypestringThe event type.
handlerFile
JavaScript Function
The event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

void cancelTask ()
Cancels the specified background task.

Array of BackgroundTask getElements ()
Resolves the object specifier, creating an array of object references.

any queryProperty (name: string)
Queries for a particular property in the task metadata.

ParameterTypeDescription
namestringThe task property being queried

bool removeEventListener (eventType: string, handler: varies[, captures: bool=false])
Removes the event listener.

ParameterTypeDescription
eventTypestringThe registered event type.
handlerFile
JavaScript Function
The registered event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

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

string toSpecifier ()
Retrieves the object specifier.

TaskState waitForTask ()
Waits for the task to finish.

Used in:

BackgroundTask BackgroundTasks.nextItem (obj: BackgroundTask)

BackgroundTask BackgroundTasks.previousItem (obj: BackgroundTask)

Return

Array of BackgroundTask BackgroundTask.getElements ()

BackgroundTask BackgroundTasks.[] (index: number)

BackgroundTask BackgroundTasks.anyItem ()

Array of BackgroundTask BackgroundTasks.everyItem ()

BackgroundTask BackgroundTasks.firstItem ()

BackgroundTask BackgroundTasks.item (index: varies)

BackgroundTask BackgroundTasks.itemByID (id: number)

BackgroundTask BackgroundTasks.itemByName (name: string)

Array of BackgroundTask BackgroundTasks.itemByRange (from: varies, to: varies)

BackgroundTask BackgroundTasks.lastItem ()

BackgroundTask BackgroundTasks.middleItem ()

BackgroundTask BackgroundTasks.nextItem (obj: BackgroundTask)

BackgroundTask BackgroundTasks.previousItem (obj: BackgroundTask)

Jongware, 23-Mar-2011 v3.0.3dContents :: Index