ScriptPreference

Scripting environment preferences.

Methods:

addEventListener, getElements, removeEventListener, toSource, toSpecifier

Objects:

AutoEnum, Boolean, EventListeners, Events, File, MeasurementUnits, Object, String, UserInteractionLevels,

Hierarchy:

Superclass: Preference

Class: ScriptPreference

Property Listing

Property

Type

Access

Description

enableRedraw

Boolean

read/write

If true, enables redraw during script execution.

eventListeners

EventListeners EventListener

readonly

A collection of event listeners.

events

Events Event

readonly

A collection of events.

isValid

Boolean

readonly

Returns true if the object specifier resolves to valid objects.

measurementUnit

AutoEnum

AutoEnum.AUTO_VALUE

MeasurementUnits

MeasurementUnits.AGATES

MeasurementUnits.AMERICAN_POINTS

MeasurementUnits.BAI

MeasurementUnits.CENTIMETERS

MeasurementUnits.CICEROS

MeasurementUnits.CUSTOM

MeasurementUnits.HA

MeasurementUnits.INCHES

MeasurementUnits.INCHES_DECIMAL

MeasurementUnits.MILLIMETERS

MeasurementUnits.MILS

MeasurementUnits.PICAS

MeasurementUnits.PIXELS

MeasurementUnits.POINTS

MeasurementUnits.Q

MeasurementUnits.U

read/write

The measurement unit used during script processing. Can return: AutoEnum enumerator or MeasurementUnits enumerator.

parent

Application

readonly

The parent of the ScriptPreference (a Application).

properties

Object

read/write

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

scriptsFolder

File

readonly

The path to the Scripts folder for the application.

scriptsList

Array of 2 Strings

Array of Files File

readonly

A list of the scripts in the Scripts folder. Can return: Array of Array of 2 Strings or Files.

userInteractionLevel

UserInteractionLevels

UserInteractionLevels.INTERACT_WITH_ALERTS

UserInteractionLevels.INTERACT_WITH_ALL

UserInteractionLevels.NEVER_INTERACT

read/write

Controls the display of dialogs and alerts during script processing.

version

String

Real

read/write

The version of the scripting environment. Can also accept: Real.

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)

ScriptPreference getElements ()

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

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

String toSpecifier ()

Retrieves the object specifier.

Object of

Application.scriptPreferences

Event.parent

EventListener.parent

MutationEvent.parent

Return

ScriptPreference.getElements()