Adobe Illustrator CS6 Type Library JS: Application

Illustrator CS6

Class

Application

 The Adobe Illustrator application.

QuickLinks

aATAddItem, aATClear, aATDuplicateItem, aATEditItem, aATErrorsExist, aATExecuteSession, aATExecuteSessionFromFile, aATFileRelativeChanged, aATFileSaveDialog, aATGetEditorDialogFile, aATGetErrorDialogFile, aATGetListOfRelativePaths, aATGetSession, aATLoadLibExtension, aATLoadModel, aATLoadSessionFile, aATLoadUIExtension, aATMoveItem, aATRemoveItem, aATReplaceItem, aATSaveAsSession, aATSaveSession, applyDataToItem, applySingleDataPointToItem, beep, concatenateMatrix, concatenateRotationMatrix, concatenateScaleMatrix, concatenateTranslationMatrix, convertSampleColor, copy, cut, doScript, dumpPGFFile, executeMenuCommand, getExecutionOutput, getIdentityMatrix, getPPDFileInfo, getPresetFileOfType, getPresetSettings, getRotationMatrix, getScaleMatrix, getScriptableHelpGroup, getTranslationMatrix, getVersionString, invertMatrix, isEqualMatrix, isSingularMatrix, loadAction, loadColorSettings, open, paste, quit, redo, redraw, reflectCSAW, runAPITest, sendScriptMessage, showPresets, translatePlaceholderText, translateString, undo, unloadAction

Hierarchy

Object
Application

Properties

PropertyTypeAccessDescription
PDFPresetsListArray of string readonlyThe list of PDF preset names currently available for use.
PPDFileListArray of PPDFile readonlyThe list of PPD files currently available for use. For performance reasons, the PPDFile entry only contains the model name and file spec of each PPD file.
activeDocumentDocument r/wThe active document.
browserAvailablebool readonlyIs a web browser available?
buildNumberstring readonlyThe build number of the Adobe Illustrator application.
colorSettingsListArray of File readonlyThe list of color settings files currently available for use.
coordinateSystemCoordinateSystem:
CoordinateSystem.DOCUMENTCOORDINATESYSTEM
CoordinateSystem.ARTBOARDCOORDINATESYSTEM
r/wCoordinate System used by script.
defaultColorSettingsFile readonlyThe default color settings file for the current application locale.
documentsDocuments Document readonlyThe open documents.
flattenerPresetsListArray of string readonlyThe list of flattener style names currently available for use.
freeMemoryInt32 readonlyThe amount of unused memory within the Adobe Illustrator partition.
localestring readonlyThe Locale of the Adobe Illustrator application.
namestring readonlyThe application's name.
parentObject readonlyThe object's container.
pathFile readonlyPath specification for the application.
preferencesPreferences readonlyPreferences for Illustrator.
printPresetsListArray of string readonlyThe list of print preset names currently available for use.
printerListArray of Printer readonlyThe list of installed printers.
scriptingVersionstring readonlyThe version of the Scripting plugin.
selectionany r/wThe selection visible to the user.
startupPresetsListArray of string readonlyThe list of presets available for creating a new document.
textFontsTextFonts TextFont readonlyInstalled fonts.
tracingPresetsListArray of string readonlyThe list of tracing preset names currently available for use.
typenamestring readonlyThe class name of the object.
userInteractionLevelUserInteractionLevel:
UserInteractionLevel.DONTDISPLAYALERTS
UserInteractionLevel.DISPLAYALERTS
r/wWhat level of interaction with the user should be allowed when handling script commands.
versionstring readonlyThe version of the Adobe Illustrator application.
visiblebool readonlyIs the application visible.

Methods

Instances

string aATAddItem (sessionIndex: Int32, destinationSequenceID: Int32, destinationIndex: Int32, srcItemIDData: string, type: string)
Add the specified to the sequencer.

ParameterTypeDescription
sessionIndexInt32The index in the session of the top-most sequence for the item to add.
destinationSequenceIDInt32The UID for the owning sequence.
destinationIndexInt32The item UID where to insert.
srcItemIDDatastringThe item ID of the item to construct.
typestringThe source of the item to construct.

string aATClear ()
Clear the sequencer.

string aATDuplicateItem (sessionIndex: Int32, item: string)
Duplicates the specified item(s) from the sequencer.

ParameterTypeDescription
sessionIndexInt32The index in the session of the top-most sequence for the item to add.
itemstringThe item UID(s)

string aATEditItem (sessionIndex: Int32, item: string)
Opens the specified item from the sequencer in the item editor.

ParameterTypeDescription
sessionIndexInt32The index in the session of the top-most sequence for the item to add.
itemstringThe item UID.

bool aATErrorsExist ()
Retrieves a boolean indicating the presence of errors in the last script to execute.

void aATExecuteSession ()
Executes the active session in the sequencer.

void aATExecuteSessionFromFile (file: File)
Executes the active session in the sequencer.

ParameterTypeDescription
fileFileExecute a session file.

string aATFileRelativeChanged (path: string, relative: string, newRelative: string)
Switches a files relative token and path.

ParameterTypeDescription
pathstringThe path relative to the folder specified by Relative.
relativestringThe current relative path token.
newRelativestringThe new relative path token.

string aATFileSaveDialog (path: string, relative: string, type: string)
Prompts the user to save a file or choose a file or directory and returns a relative path string to the file.

ParameterTypeDescription
pathstringThe path relative to the folder specified by Relative.
relativestringThe current relative path token.
typestringThe type of dialog to show in string format.

File aATGetEditorDialogFile ()
Retrieves a file path to the AAT editor swf.

File aATGetErrorDialogFile ()
Retrieves a file path to the AAT error dialog swf.

string aATGetListOfRelativePaths ()
Gets an XML string listing the relative paths and the UI strings to display them.

string aATGetSession ()
Get the active session for the sequncer.

string aATLoadLibExtension ()
Loads a session file as an extension to the editor.

string aATLoadModel ()
Loads the aat model to the editor.

string aATLoadSessionFile ()
Loads a session into the sequencer.

string aATLoadUIExtension ()
Loads a UI description as an extension to the editor.

string aATMoveItem (sessionIndex: Int32, moveThisID: string, newSessionIndex: Int32, destinationSequenceID: string, destinationIndex: Int32)
Moves the specified in the sequencer.

ParameterTypeDescription
sessionIndexInt32The index in the session of the top-most sequence for the item to move.
moveThisIDstringThe UID of the item to replace.
newSessionIndexInt32The index in the session of the destination top-most sequence.
destinationSequenceIDstringThe UID for the owning sequence.
destinationIndexInt32The index where to insert.

string aATRemoveItem (sessionIndex: Int32, item: string)
Removes the specified item from the sequencer.

ParameterTypeDescription
sessionIndexInt32The index in the session of the top-most sequence for the item to add.
itemstringThe item UID.

string aATReplaceItem (sessionIndex: Int32, replaceThisID: Int32, srcItemIDData: string, type: string)
Replaces the specified to the sequencer.

ParameterTypeDescription
sessionIndexInt32The index in the session of the top-most sequence for the item to add.
replaceThisIDInt32The UID of the item to replace.
srcItemIDDatastringThe item ID of the item to construct.
typestringThe source of the item to construct.

string aATSaveAsSession ()
Saves the active session in the sequencer to a new file.

string aATSaveSession ()
Saves the active session in the sequencer to a file.

string applyDataToItem (sessionIndex: Int32, item: string, data: string)
Applies the data used in the item editor to the item.

ParameterTypeDescription
sessionIndexInt32The index in the session of the top-most sequence for the item to edit.
itemstringThe item UID.
datastringThe data to apply in XML format.

bool applySingleDataPointToItem (sessionIndex: Int32, item: string, dataID: string, data: string)
Applies data to the specified item from the sequencer in the item editor.

ParameterTypeDescription
sessionIndexInt32The index in the session of the top-most sequence for the item to add.
itemstringThe item UID.
dataIDstringThe data to apply in XML format.
datastringThe data to apply in XML format.

void beep ()

Matrix concatenateMatrix (matrix: Matrix, secondMatrix: Matrix)
Concatenate two transformation matrices.

ParameterTypeDescription
matrixMatrixThe matrix that is to be added to.
secondMatrixMatrixSecond transformation matrix.

Matrix concatenateRotationMatrix (matrix: Matrix, angle: number)
Concatenate a rotation matrix to a transformation matrix.

ParameterTypeDescription
matrixMatrixThe matrix that is to be added to.
anglenumberAngle of rotation (in degrees)

Matrix concatenateScaleMatrix (matrix: Matrix[, scaleX: number=100.0][, scaleY: number=100.0])
Concatenate a scale matrix to a transformation matrix.

ParameterTypeDescription
matrixMatrixThe matrix that is to be added to.
scaleXnumberHorizontal scaling factor expressed as a percentage (100 = 100%) (default: 100.0) (Optional)
scaleYnumberVertical scaling factor expressed as a percentage (100 = 100%) (default: 100.0) (Optional)

Matrix concatenateTranslationMatrix (matrix: Matrix[, deltaX: number=0.0][, deltaY: number=0.0])
Concatenate a translation to a transformation matrix.

ParameterTypeDescription
matrixMatrixThe matrix that is to be added to.
deltaXnumberHorizontal transformation. (default: 0.0) (Optional)
deltaYnumberVertical transformation. (default: 0.0) (Optional)

Array of number convertSampleColor (sourceColorSpace: ImageColorSpace, sourceColor: Array of number, destColorSpace: ImageColorSpace, colorConvertPurpose: ColorConvertPurpose[, sourceHasAlpha: bool=false][, destHasAlpha: bool=false])
Converts a sample-component color from one color space to another.

ParameterTypeDescription
sourceColorSpaceImageColorSpace:
ImageColorSpace.GrayScale
ImageColorSpace.RGB
ImageColorSpace.CMYK
ImageColorSpace.LAB
ImageColorSpace.Separation
ImageColorSpace.DeviceN
ImageColorSpace.Indexed
The source color space.
sourceColorArray of numberThe color to convert, an array of color components. First location of the array should contain alpha if source-has-alpha is true.
destColorSpaceImageColorSpace:
ImageColorSpace.GrayScale
ImageColorSpace.RGB
ImageColorSpace.CMYK
ImageColorSpace.LAB
ImageColorSpace.Separation
ImageColorSpace.DeviceN
ImageColorSpace.Indexed
The destination color space.
colorConvertPurposeColorConvertPurpose:
ColorConvertPurpose.defaultpurpose
ColorConvertPurpose.previewpurpose
ColorConvertPurpose.exportpurpose
ColorConvertPurpose.dummypurpose
The parameter which passes the purpose of conversion.
sourceHasAlphaboolTrue if alpha channel is present in source color. (default: false) (Optional)
destHasAlphaboolTrue if alpha channel is present in destination color. (default: false) (Optional)

void copy ()
Copy current selection to the clipboard.

void cut ()
Cut current selection to the clipboard.

void doScript (action: string, from: string[, dialogs: bool=true])
Play an action from the Actions Palette.

ParameterTypeDescription
actionstringThe name of the action to play (note that the case of letters in the Action name is important and must match the case of the name in the Actions palette)
fromstringThe name of the action set containing the action being played (note that the case of letters in the Action Set name is important and must match the case of the name in the Actions palette)
dialogsboolAre dialog boxes associated with the action to be presented? (default: true) (Optional)

bool dumpPGFFile (file: File[, documentColorSpace: DocumentColorSpace], pGFFile: File)
Dump the PGF portion of ai file to txt file.

ParameterTypeDescription
fileFileThe AI file to be opened.
documentColorSpaceDocumentColorSpace:
DocumentColorSpace.RGB
DocumentColorSpace.CMYK
Choose color space only for documents saved with multiple color models (pre-Illustrator 9) (Optional)
pGFFileFileFolder to save the output PGF file.

void executeMenuCommand (menuCommandString: string)
Executes a menu command using the menu shortcut string.

ParameterTypeDescription
menuCommandStringstringMenu command shortcut.

string getExecutionOutput ()
Retrieves a string containing the results of the last script to execute.

Matrix getIdentityMatrix ()
Returns an identity matrix.

PPDFileInfo getPPDFileInfo (name: string)
Get detailed info from the specified PPD file.

ParameterTypeDescription
namestringThe model name of the PPD file.

File getPresetFileOfType (presetType: DocumentPresetType)
Given a preset type, returns the full path to the application's default document profile for the type.

ParameterTypeDescription
presetTypeDocumentPresetType:
DocumentPresetType.Print
DocumentPresetType.Web
DocumentPresetType.Mobile
DocumentPresetType.Video
DocumentPresetType.BasicCMYK
DocumentPresetType.BasicRGB
The preset type.

DocumentPreset getPresetSettings (preset: string)
Given a preset name, tries and retrieves the settings from the preset template.

ParameterTypeDescription
presetstringThe name of the preset.

Matrix getRotationMatrix ([angle: number=0.0])
Returns a rotation transformation matrix.

ParameterTypeDescription
anglenumberAngle of rotation (in degrees) (default: 0.0) (Optional)

Matrix getScaleMatrix ([scaleX: number=100.0][, scaleY: number=100.0])
Returns a scale transformation matrix.

ParameterTypeDescription
scaleXnumberHorizontal scaling factor expressed as a percentage (100 = 100%) (default: 100.0) (Optional)
scaleYnumberVertical scaling factor expressed as a percentage (100 = 100%) (default: 100.0) (Optional)

any getScriptableHelpGroup ()
Get the scriptable help group object that represents the search widget in the app bar.

Matrix getTranslationMatrix ([deltaX: number=0.0][, deltaY: number=0.0])
Returns a translation matrix.

ParameterTypeDescription
deltaXnumberHorizontal transformation. (default: 0.0) (Optional)
deltaYnumberVertical transformation. (default: 0.0) (Optional)

string getVersionString ()
Retrieves a string representing the AAT version.

Matrix invertMatrix (matrix: Matrix)
Invert a matrix.

ParameterTypeDescription
matrixMatrixThe matrix to invert.

bool isEqualMatrix (matrix: Matrix, secondMatrix: Matrix)
Compares two matrices for equality.

ParameterTypeDescription
matrixMatrixFirst transformation matrix to compare.
secondMatrixMatrixSecond transformation matrix.

bool isSingularMatrix (matrix: Matrix)
Tests if a matrix is singular (cannot be inverted)

ParameterTypeDescription
matrixMatrixThe matrix to check.

void loadAction (actionFilePath: File)
Load an action into action palette.

ParameterTypeDescription
actionFilePathFileThe path on the system of the action file to be loaded.

void loadColorSettings (fileSpec: File)
Load the color settings from the file. If the file is an empty file spec, the color management will be turned off.

ParameterTypeDescription
fileSpecFileFile spec for the color settings.

Document open (file: File[, documentColorSpace: DocumentColorSpace][, options: any])
Open the specified document file.

ParameterTypeDescription
fileFileThe file to be opened.
documentColorSpaceDocumentColorSpace:
DocumentColorSpace.RGB
DocumentColorSpace.CMYK
Choose color space only for documents saved with multiple color models (pre-Illustrator 9) (Optional)
options any Options for opening a particular type of file. (Optional)

void paste ()
Paste clipboard into the current document.

void quit ()
Quit the application.

void redo ()
Redo the last transaction.

void redraw ()
Force Illustrator to redraw its window(s)

void reflectCSAW (outputFolder: File)
Generate Creative Suite ActionScript Wrappers in specified directory.

ParameterTypeDescription
outputFolderFileLocation for the output files.

void runAPITest (testName: string)
Runs API Tests from the TestAPI Plug-in.

ParameterTypeDescription
testNamestringArguments for Running Tests - eg. Name of Test/Suite.

string sendScriptMessage (pluginName: string, messageSelector: string, inputString: string)
Sends the script message to the required plugin.

ParameterTypeDescription
pluginNamestringPlugin to which message needs to be sent.
messageSelectorstringFunctionality that is to be executed.
inputStringstringPass any data encoded in a string.

Array of string showPresets (fileSpec: File)
Get presets from the file.

ParameterTypeDescription
fileSpecFileFile spec to import from.

string translatePlaceholderText (text: string)
Translate the placeholder text to regular text. A method to enter unicode points in hex values.

ParameterTypeDescription
textstringThe placeholder text to be translated.

string translateString (key: string, source: string)
Returns a string translated from the key and source data passed in.

ParameterTypeDescription
keystringThe string to translate.
sourcestringThe plugin name from the source of the key.

void undo ()
Undo the last transaction.

void unloadAction (setName: string, actionName: string)
Unloads an action into action palette.

ParameterTypeDescription
setNamestringName of the set to be unloaded.
actionNamestringName of the action to be unloaded.

Jongware, 25-Nov-2012 v3.0.3iContents :: Index