Adobe InDesign CS4 (6.0) Object Model JS: ScriptUI

InDesign CS4

Class

ScriptUI

 A global class containing central information about ScriptUI. Not instantiable.

QuickLinks

getResourceText, newFont, newImage

Class

PropertyTypeAccessDescription
AlignmentString readonlyCollects the enumerated values that can be used in the alignment and alignChildren properties of controls and containers.
Predefined alignment values are: TOP, BOTTOM, LEFT, RIGHT, FILL, CENTER
FontStyleObject readonlyCollects the enumerated values that can be used as the style argument to the ScriptUI.newFont() method.
Predefined styles are REGULAR, BOLD, ITALIC, BOLDITALIC.
applicationFontsObject readonlyThe font constants defined by the host application.
compatibilityObject readonlyAn object whose properties are the names of compatability modes supported by the host application.
The presence of ScriptUI.compatability.su1PanelCoordinates means that the application allows backward compatibility with the coordinate system of Panel elements in ScriptUI version 1.
coreVersionString readonlyA string containing the internal version number of the ScriptUI module.
frameworkNameString readonlyA string containing the name of the UI component framework with which this version of ScriptUI is compatible.
versionAny readonlyA string containing the version number of the ScriptUI component framework

Methods

String getResourceText (text: String)
Finds and returns the resource for a given text string from the host application's resource data.
If no string resource matches the given text, the text itself is returned.

ParameterTypeDescription
textStringThe text to match.

ScriptUIFont newFont (name: String, style: String | Number, size: Number)
Creates a new font object for use in text controls and titles.

ParameterTypeDescription
nameStringThe font name, or the font family name.
styleString | NumberThe font style; can be string, or one of the values of ScriptUI.FontStyle.
sizeNumberThe font size in points.

ScriptUIImage newImage (normal: String[, disabled: String][, pressed: String][, rollover: String])
Loads a new image from resources or disk files into an image object.
Creates a new global image object for use in controls that can display images, loading the associated images from the specified resources or image files.

ParameterTypeDescription
normalStringThe resource name or the disk file path to the image used for the normal state.
disabledStringThe resource name, or the disk file path to the image used for the disabled state. (Optional)
pressedStringThe resource name, or the disk file path to the image used for the pressed state. (Optional)
rolloverStringThe resource name, or the disk file path to the image used for the rollover state. (Optional)

Jongware, 20-Jun-2010 v3.0.3dContents :: Index