BackgroundTask
QuickLinks
Hierarchy
Properties
| Property | Type | Access | Description |
|---|---|---|---|
| alerts |
Array
of Array of 2 TaskAlertType Strings |
readonly | The alerts encountered while running this task object. Can return: Array of Array of 2 TaskAlertType enumerators or Strings. |
| documentName | string | readonly | The document name on which this task operates. |
| eventListeners | EventListeners EventListener | readonly | A collection of event listeners. |
| events | Events Event | readonly | A collection of events. |
| id | number | readonly | The unique ID of the BackgroundTask. |
| index | number | readonly | The index of the BackgroundTask within its containing object. |
| isValid | bool | readonly | Returns true if the object specifier resolves to valid objects. |
| name | string | readonly | The name of the BackgroundTask. |
| parent | Application | readonly | The parent of the BackgroundTask (a Application). |
| percentDone | number | readonly | Progress information for this task. |
| properties | Object | r/w | A property that allows setting of several properties at the same time. |
| status | TaskState: TaskState.QUEUED TaskState.RUNNING TaskState.WAITING TaskState.CANCELLING TaskState.COMPLETED TaskState.CANCELLED |
readonly | The current status of this task object. |
Methods
Instances
EventListener addEventListener (eventType:
string, handler:
varies[, captures:
bool=false])
Adds an event listener.
| Parameter | Type | Description |
|---|---|---|
| eventType | string | The event type. |
| handler | File JavaScript Function | The event handler. Can accept: File or JavaScript Function. |
| captures | bool | This 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.
| Parameter | Type | Description |
|---|---|---|
| name | string | The task property being queried |
bool removeEventListener (eventType:
string, handler:
varies[, captures:
bool=false])
Removes the event listener.
| Parameter | Type | Description |
|---|---|---|
| eventType | string | The registered event type. |
| handler | File JavaScript Function | The registered event handler. Can accept: File or JavaScript Function. |
| captures | bool | This 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, 29-Apr-2012 v3.0.3i | Contents :: Index |