est

Page 136

Adobe Photoshop CS4 JavaScript Scripting Reference

JavaScript Object Reference

136

Notifiers The collection of Notifier objects in the document. Access through the Application.notifiers collection property. For example: var notRef = app.notifiers.add("OnClickGoButton", eventFile)

Notifiers must be enabled using the Application.notifiersEnabled property.

Properties Property

Value type

What it is

length

number

Read-only. The number of elements in the notifiers collection.

parent

Application

Read-only. The notifiers object’s container

typename

string

Read-only. The class name of the referenced notifiers object.

Methods Method

Parameter type Returns Notifier

add (event, eventFile [, eventClass])

string File string

What it does Creates a notifier object and adds it to this collection. event defines the class ID of the event: use a

4-characters code or a unique string. See Appendix A: Event ID Codes. eventFile defines the script file that executes when the event occurs.

When an event applies to multiple types of objects, use the eventClass (a 4-character ID or unique string) to distinguish which object this Notifier applies to. For example, the Make event ("Mk ") applies to documents ("Dcmn"), channels ("Chnl") and other objects. Tip: When specifying an event or event calss wtih a 4-character ID code, omit the single quotes in your code. removeAll ()

Removes all member objects from the notifiers collection. You can also remove a notifier object from the Script Events Manager drop-down list by deleting the file named Script Events Manager.xml from the Photoshop preferences folder. See Adobe Photoshop CS4 help for more information.


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.