BackgroundTask

background task

Methods:

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

Objects:

Boolean, EventListeners, Events, Number, Object, String, TaskState,

Property Listing

Property

Type

Access

Description

alerts

Array of 2 TaskAlertType enumerators

Array of Strings String

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

Boolean

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

read/write

A property that allows setting of several properties at the same time.

status

TaskState

TaskState.CANCELLED

TaskState.CANCELLING

TaskState.COMPLETED

TaskState.QUEUED

TaskState.RUNNING

TaskState.WAITING

readonly

The current status of this task object.

Method Listing

EventListener addEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Adds an event listener.

Parameter

Type

Description

eventType

String

The event type.

handler

File

JavaScriptFunction

The event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

undefined cancelTask ()

Cancels the specified background task.

BackgroundTask getElements ()

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

Varies queryProperty (name:String)

Queries for a particular property in the task metadata.

Parameter

Type

Description

name

String

The task property being queried

Boolean removeEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Removes the event listener.

Parameter

Type

Description

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. (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.

Object of

Event.parent

EventListener.parent

MutationEvent.parent

Return

BackgroundTask.getElements()

BackgroundTasks.anyItem()

BackgroundTasks.everyItem()

BackgroundTasks.nextItem()

BackgroundTasks.previousItem()

BackgroundTasks.itemByID()

BackgroundTasks.item()

BackgroundTasks.[]()

BackgroundTasks.itemByName()

BackgroundTasks.itemByRange()

BackgroundTasks.firstItem()

BackgroundTasks.lastItem()

BackgroundTasks.middleItem()

Document.asynchronousExportFile()

FormField.asynchronousExportFile()

Button.asynchronousExportFile()

MultiStateObject.asynchronousExportFile()

CheckBox.asynchronousExportFile()

ComboBox.asynchronousExportFile()

ListBox.asynchronousExportFile()

RadioButton.asynchronousExportFile()

TextBox.asynchronousExportFile()

SignatureField.asynchronousExportFile()

Movie.asynchronousExportFile()

Sound.asynchronousExportFile()

PageItem.asynchronousExportFile()

Oval.asynchronousExportFile()

Rectangle.asynchronousExportFile()

GraphicLine.asynchronousExportFile()

Polygon.asynchronousExportFile()

Group.asynchronousExportFile()

Image.asynchronousExportFile()

EPS.asynchronousExportFile()

PDF.asynchronousExportFile()

WMF.asynchronousExportFile()

PICT.asynchronousExportFile()

Graphic.asynchronousExportFile()

SplineItem.asynchronousExportFile()

EPSText.asynchronousExportFile()

ImportedPage.asynchronousExportFile()

SVG.asynchronousExportFile()

MediaItem.asynchronousExportFile()

HtmlItem.asynchronousExportFile()

Text.asynchronousExportFile()

Character.asynchronousExportFile()

Word.asynchronousExportFile()

Line.asynchronousExportFile()

TextColumn.asynchronousExportFile()

Paragraph.asynchronousExportFile()

TextStyleRange.asynchronousExportFile()

InsertionPoint.asynchronousExportFile()

TextFrame.asynchronousExportFile()

Story.asynchronousExportFile()

EndnoteTextFrame.asynchronousExportFile()

XMLElement.asynchronousExportFile()

XmlStory.asynchronousExportFile()