Window class¶
The Window class defines these static properties and functions. Window instances created with new Window() do not have these properties and functions defined.
Window class properties¶
frameworkName |
|
Deprecated. Use ScriptUI.frameworkName instead. |
version |
|
Deprecated. Use ScriptUI.version instead. |
Window class functions¶
Access these function through the class. For example:
Window.alert("Notification to user");
alert()¶
Window.alert(message[, title, errorIcon]);
Displays a platform-standard dialog containing a short message and an OK button.
|
The string for the displayed message. |
|
Optional. A string to appear as the title of the dialog, if the platform supports a
title. Mac OS does not support titles for alert dialogs. The default title string is
|
|
Optional. When true, the platform-standard alert icon is replaced by the platform-standard error icon in the dialog. Default is false. |
Returns undefined
confirm()¶
Window.confirm(message[,noAsDflt ,title ]);
Displays a platform-standard dialog containing a short message and two buttons labeled Yes and No.
|
The string for the displayed message. |
|
Optional. When |
|
Optional. A string to appear as the title of the dialog, if the platform supports a
title. Mac OS does not support titles for confirmation dialogs. The default title
string is |
Returns true
if the user clicked Yes, false
if the user clicked No.
find()¶
Window.find(resourceName)
Window.find(type, title)
Use this method to find an existing window. This includes windows already created by a script, and windows created by the application (if the application supports this case).
|
The name of a predefined resource available to JavaScript in the current application. |
|
Optional. The window type (see Window object constructor) used if
there is more than one window with the same title.
Can be |
|
The window title. |
Note
Not supported in all ScriptUI implementations.
Returns a Window object found or generated from the resource, or null
if no such window or
resource exists.
prompt()¶
Window.prompt(message, preset[, title ]);
Displays a modal dialog that returns the user’s text input.
|
The string for the displayed message. |
|
The initial value to be displayed in the text edit field. |
|
Optional. A string to appear as the title of the dialog. In Windows, this appears in
the window’s frame; in Mac OS it appears above the message. The default title
string is |
Returns the value of the text edit field if the user clicked OK, null
if the user clicked Cancel.