ScriptUIExtendScript only
Object

Window

The instance represents a top-level window or dialog box, which contains user-interface elements.

Properties

NameType AccessDescription
Boolean read/write Set to true to make this window active.
String read/write Tells the layout manager how unlike-sized children of this container should be aligned within a column or row.
String read/write The alignment style for child elements of a container. If defined, this value overrides the alignChildren setting for the parent container.
Bounds read/write The bounds of the window's drawable area, excluding the frame, in screen coordinates.
Object read/write For windows of type dialog, the UI element to notify when the user presses a cancellation key combination.
Number 0– read/write A number of characters for which to reserve space when calculating the preferred size of the window.
Object[] readonly The collection of UI elements that have been added to this container.
Object read/write For windows of type dialog, the UI element to notify when the user presses a Enter key.
Boolean read/write True if this element is enabled.
Bounds readonly The bounds of the window frame in screen coordinates.
Point read/write The top left corner of the window frame in screen coordinates.
Dimension readonly The size and location of the window's frame in screen coordinates.
static String readonly Deprecated. Use ScriptUI.frameworkName instead.
ScriptUIGraphics readonly The graphics object that can be used to customize the window’s appearance, in response to the onDraw event.
String read/write The help text that is displayed when the mouse hovers over the element.
Number 0– read/write The number of pixels to indent the element.
String = left read/write The default text justification style for child text elements.
LayoutManager read/write The layout manager for this container.
Point read/write The upper left corner of the window's drawable area.
Number read/write The number of pixels between the edges of a container and the outermost child elements.
Boolean read/write True if the window is expanded.
Dimension read/write The largest rectangle to which the window can be resized.
Boolean read/write True if the window is minimized or iconified.
Dimension read/write The smallest rectangle to which the window can be resized.
Number = 1.0 read/write The opacity of the window, in the range [0..1].
String read/write The layout orientation of children in a container.
readonly The immediate parent element.
Dimension read/write The preferred size of the window.
Object read/write An object that contains one or more creation properties of the container (properties used only when the element is created).
String read/write The keypress combination that invokes this element's onShortcutKey() callback.
Dimension read/write The current size and location of the content area of the window in screen coordinates.
Number read/write The number of pixels separating one child element from its adjacent sibling element.
String read/write The title, label, or displayed text, a localizeable string.
String readonly The element type; "dialog", "palette", or "window".
static Varies readonly Deprecated. Use ScriptUI.version instead.
Boolean read/write When true, the element is shown, when false it is hidden.
Window readonly The window that this element belongs to.
Bounds readonly The bounds of this window relative to the top-level parent window.

Methods

void

Creates a new window.

type String The window type.
title? String The window title, a localizable string.
bounds? Bounds The window's position and size.
properties? Object An object containing creation-only properties.
Object

Creates and returns a new control or container object and adds it to the children of this window.

type String The type of the child element, as specified for the type property.
bounds? Bounds A bounds specification that describes the size and position of the new control or container, relative to its parent.
text? String The text or label, a localizable string.
properties? Object An object that contains one or more creation properties of the new child (properties used only when the element is created).
Boolean

Registers an event handler for a particular type of event occuring in this window.

eventName String The name of the event.
handler Function The function that handles the event.
capturePhase? Boolean When true, the handler is called only in the capturing phase of the event propagation.
void

Displays a platform-standard dialog containing a short message and an OK button.

message String TThe string for the displayed message.
title? String A string to appear as the title of the dialog, if the platform supports a title.
errorIcon Boolean When true, the platform-standard alert icon is replaced by the platform-standard error icon in the dialog.
void

Centers this window on screen or with repect to another window.

window? Window The relative window. If not specified, centers on the screen.
void

Closes this window.

return? Varies A number to be returned from the show() method that invoked this window as a modal dialog.
Boolean

Displays a platform-standard dialog containing a short message and two buttons labeled Yes and No.

message String The string for the displayed message.
noAsDefault Boolean When true, the No button is the default choice, selected when the user types Enter.
title? String A string to appear as the title of the dialog, if the platform supports a title.
UIEvent

Simulates the occurrence of an event in this target.

Window

Use this method to find an existing window.

type String The name of a predefined resource available to JavaScript in the current application; or the window type.
title String The window title.
void

Hides this windows.

void

Sends a notification message to all listeners, simulating the specified user interaction event.

eventName? String The event name; if omitted, the default event is sent.
void

An event-handler callback function, called when the window acquires the keyboard focus.

Boolean

An event-handler callback function, called when the window is about to be closed.

void

An event-handler callback function, called when the window loses the keyboard focus.

void

An event-handler callback function, called when the window has been moved

void

An event-handler callback function, called when the window is being moved

void

An event-handler callback function, called after the window has been resized

void

An event-handler callback function, called while a window is being resized

void

In Windows only, an event-handler callback function, called a shortcut-key sequence is typed that matches the shortcutKey value for this window.

void

An event-handler callback function, called just before the window is displayed

String

Displays a modal dialog that returns the user’s text input.

prompt String The string for the displayed message.
default? String The initial value to be displayed in the text edit field.
title? String A string to appear as the title of the dialog.
void

Removes the specified child control from this window’s children array.

what Varies The child control to remove, specified by 0-based index, text property value, or as a control object.
Boolean

Unregisters an event handler for a particular type of event occuring in this window.

eventName String The name of the event.
handler Function The function that handles the event.
capturePhase Boolean Whether to call the handler only in the capturing phase of the event propagation.
void

Makes this window visible.

Object of 16

Properties elsewhere that hold a Window.

Parameter of 1

Method parameters that accept a Window.

Return 1

Methods that return a Window.