Adobe InDesign CS (3.0) Object Model JS: Application

InDesign CS

Class

Application

 The InDesign application

QuickLinks

activate, cascadeWindows, copy, cut, deleteUnusedTags, doScript, exportPresets, importFile, importStyles, loadXMLTags, open, paste, pasteInPlace, pasteInto, print, quit, saveXMLTags, search, select, tileWindows

Hierarchy

Application
Application
Application | Book | ButtonPreference | ChangePreference | CharacterStyle | ClipboardPreference | Color | ColorSetting | DashedStrokeStyle | DataMergeOption | Dialog | DictionaryPreference | DisplayPerformancePreference | DisplaySetting | Document | DocumentPreference | DocumentPreset | DottedStrokeStyle | EPSExportPreference | EPSImportPreference | ExcelImportPreference | FindPreference | FlattenerPreset | Font | GalleyPreference | GeneralPreference | Gradient | GridPreference | GuidePreference | IMEPreference | ImageIOPreference | IndexOptions | Ink | JPEGExportPreference | LanguageWithVendors | LayoutAdjustmentPreference | LayoutWindow | Library | MarginPreference | MixedInk | MixedInkGroup | NotePreference | PDFExportPreference | PDFExportPreset | PDFPlacePreference | PackageForGoLivePreference | ParagraphStyle | PasteboardPreference | PolygonPreference | PrinterPreset | SVGExportPreference | ScriptPreference | SpellPreference | StoryExportPreference | StoryPreference | StoryWindow | StripedStrokeStyle | StrokeStyle | Swatch | TOCStyle | TaggedTextExportPreference | TaggedTextImportPreference | TextDefault | TextExportPreference | TextFramePreference | TextImportPreference | TextPreference | Tint | TransformPreference | TransparencyPreference | TrapPreset | UserDictionary | ViewPreference | Window | WordRTFImportPreference | XMLExportMap | XMLExportPreference | XMLImportMap | XMLImportPreference | XMLTag | XMLViewPreference

Properties

PropertyTypeAccessDescription
activeDocumentDocument r/wThe front-most document.
activeScriptFile readonlyThe current script running from the Scripts panel.
activeWindowLayoutWindowStoryWindow
Window
r/wThe front-most window. Can return: Window, LayoutWindow or StoryWindow.
booksBooks readonlyA collection of books.
buttonPreferencesButtonPreference readonlyButton preference settings.
changePreferencesChangePreference r/wThe change preferences
characterStylesCharacterStyles readonlyA collection of character styles.
clipboardPreferencesClipboardPreference readonlyClipboard preference properties that define the way that the application interacts with the system clipboard.
colorSettingsColorSetting readonlyColor setting properties that define color management defaults.
colorsColors readonlyA collection of colors.
dashedStrokeStylesDashedStrokeStyles readonlyA collection of dashed stroke styles.
dataMergeOptionsDataMergeOption readonlyThe data merge option properties that define the data merge.
dialogsDialogs readonlyA collection of dialogs.
dictionaryPreferencesDictionaryPreference readonlyUser dictionary preference settings.
displayPerformancePreferencesDisplayPerformancePreference readonlyDisplay performance settings.
displaySettingsDisplaySettings readonlyDisplay setting properties.
documentPreferencesDocumentPreference readonlyDocument preference settings.
documentPresetsDocumentPresets readonlyA collection of document presets.
documentsDocuments readonlyA collection of documents.
dottedStrokeStylesDottedStrokeStyles readonlyA collection of dotted stroke styles.
epsExportPreferencesEPSExportPreference readonlyEPS export preferences.
epsImportPreferencesEPSImportPreference readonlyEPS import preferences.
excelImportPreferencesExcelImportPreference readonlyExcel import preferences.
filePathFile readonlyThe full path to the file.
findPreferencesFindPreference r/wThe find preference properties that define default text or attribute searches.
flattenerPresetsFlattenerPresets readonlyA collection of transparency flattener presets.
fontsFonts readonlyA collection of fonts.
fullNameFile readonlyThe full path to the Application, including the name of the Application.
galleyPreferencesGalleyPreference readonlyGalley preference settings.
generalPreferencesGeneralPreference readonlyGeneral preference settings.
gradientsGradients readonlyA collection of gradients.
gridPreferencesGridPreference readonlyGrid preference settings.
guidePreferencesGuidePreference readonlyGuide preference settings.
imageIOPreferencesImageIOPreference readonlyThe image I/O preference properties that define preferences for importing images.
imePreferencesIMEPreference readonlyIME preference settings.
indexGenerationOptionsIndexOptions readonlyThe index options properties that define how an index is formatted.
inksInks readonlyA collection of inks.
jpegExportPreferencesJPEGExportPreference readonlyJPEG export preferences.
languagesWithVendorsLanguagesWithVendors readonlyA collection of languages with vendors.
layoutAdjustmentPreferencesLayoutAdjustmentPreference readonlyLayout sdjustment preference settings.
layoutWindowsLayoutWindows readonlyA collection of layout windows.
librariesLibraries readonlyA collection of libraries.
localeLocale:
Locale.DANISH_LOCALE
Locale.ENGLISH_LOCALE
Locale.INTERNATIONAL_ENGLISH_LOCALE
Locale.FINNISH_LOCALE
Locale.FRENCH_LOCALE
Locale.GERMAN_LOCALE
Locale.ITALIAN_LOCALE
Locale.PORTUGUESE_LOCALE
Locale.SPANISH_LOCALE
Locale.SWEDISH_LOCALE
Locale.JAPANESE_LOCALE
readonlyThe locale of the application.
marginPreferencesMarginPreference readonlyMargin preference settings.
mixedInkGroupsMixedInkGroups readonlyA collection of mixed ink groups.
mixedInksMixedInks readonlyA collection of mixed inks.
namestring readonlyThe name of the Application.
notePreferencesNotePreference readonlyNote preference settings.
packageForGoLivePreferencesPackageForGoLivePreference readonlyThe Package For GoLive preference properties that define how a document is packaged for GoLive.
palettesVisiblebool r/wIf true, displays the palettes.
paragraphStylesParagraphStyles readonlyA collection of paragraph styles.
parentApplication readonlyThe parent of the Application (a Application).
pasteboardPreferencesPasteboardPreference readonlyPasteboard preference settings.
pdfExportPreferencesPDFExportPreference readonlyA collection of PDF export preferences.
pdfExportPresetsPDFExportPresets readonlyA collection of PDF export presets.
pdfPlacePreferencesPDFPlacePreference readonlyThe PDF place preference properties that define how PDF files are placed in the current document.
polygonPreferencesPolygonPreference readonlyPolygon preference properties to use to define default settings for creating a polygon.
printerPresetsPrinterPresets readonlyA collection of printer presets.
propertiesObject r/wA property that allows setting of several properties at the same time.
scriptPreferencesScriptPreference readonlyScript preferences.
selection Array of Objects
NothingEnum
Object
r/wThe selection. Can return: Object, Array of Objects or NothingEnum enumerator.
spellPreferencesSpellPreference readonlySpell-check preferences.
storyExportPreferencesStoryExportPreference readonlyStory export preference settings.
storyPreferencesStoryPreference readonlyStory preference settings.
storyWindowsStoryWindows readonlyA collection of story windows.
stripedStrokeStylesStripedStrokeStyles readonlyA collection of striped stroke styles.
strokeStylesStrokeStyles readonlyA collection of stroke styles.
svgExportPreferencesSVGExportPreference readonlySVG export preferences.
swatchesSwatches readonlyA collection of swatches.
taggedTextExportPreferencesTaggedTextExportPreference readonlyTagged text export preferences.
taggedTextImportPreferencesTaggedTextImportPreference readonlyTagged text import preferences.
textDefaultsTextDefault readonlyText default settings.
textExportPreferencesTextExportPreference readonlyText export preferences.
textFramePreferencesTextFramePreference readonlyText frame preference settings.
textImportPreferencesTextImportPreference readonlyText import preferences.
textPreferencesTextPreference readonlyText preference settings.
tintsTints readonlyA collection of tints.
tocStylesTOCStyles readonlyA collection of TOC styles.
transformPreferencesTransformPreference readonlyTransform preference properties that define default behaviors when transforming objects. Note: Transforming includes rotation, scaling, flipping, and shearing.
transparencyPreferencesTransparencyPreference readonlyTransparency preference settings.
trapPresetsTrapPresets readonlyA collection of trap presets.
unusedSwatches Array of Swatch readonlyThe swatches that are not being used.
userDictionariesUserDictionaries readonlyA collection of user dictionaries.
userInteractionLevelUserInteractionLevels:
UserInteractionLevels.NEVER_INTERACT
UserInteractionLevels.INTERACT_WITH_ALL
r/wControls the display of dialogs and alerts during script processing.
userNamestring r/wThe user associated with the tracked changes and notes.
versionnumber readonlyVersion of the application
viewPreferencesViewPreference readonlyView preference settings.
visiblebool readonlyIf true, the Application is visible.
windowsWindows readonlyA collection of windows.
wordRTFImportPreferencesWordRTFImportPreference readonlyWord and RTF import preferences.
xmlExportMapsXMLExportMaps readonlyA collection of XML export maps.
xmlExportPreferencesXMLExportPreference readonlyXML export preference settings.
xmlImportMapsXMLImportMaps readonlyA collection of XML import maps.
xmlImportPreferencesXMLImportPreference readonlyXML import preference settings.
xmlTagsXMLTags readonlyA collection of XML tags.
xmlViewPreferencesXMLViewPreference readonlyXML view preference settings.

Methods

Instances

void activate ()
Makes the application the front-most or active window.

void cascadeWindows ()
Cascades all document windows.

void copy ()
Copies the selection in the active document window to the clipboard.

void cut ()
Cuts the selection in the active document window and stores it in the clipboard.

void deleteUnusedTags ()
Deletes unused XML markup tags.

void doScript (script: any[, language: ScriptLanguage=ScriptLanguage.UNKNOWN])
Run a script in a specific language

ParameterTypeDescription
scriptFile
String
The script to execute. Can accept: File or String.
languageScriptLanguage:
ScriptLanguage.UNKNOWN
ScriptLanguage.VISUAL_BASIC
ScriptLanguage.JAVASCRIPT
The language of the script to execute. If not specified, the language used to call this method is used. (Optional) (default: ScriptLanguage.UNKNOWN)

void exportPresets (format: ExportPresetFormat, to: File)
Export the file's presets to the specified file.

ParameterTypeDescription
formatExportPresetFormat:
ExportPresetFormat.PDF_EXPORT_PRESETS_FORMAT
ExportPresetFormat.PRINTER_PRESETS_FORMAT
ExportPresetFormat.FLATTENER_PRESETS_FORMAT
ExportPresetFormat.DOCUMENT_PRESETS_FORMAT
The type of preset to export.
toFileThe file to export the presets to.

void importFile (format: ExportPresetFormat, from: File)
Imports presets from the specified file.

ParameterTypeDescription
formatExportPresetFormat:
ExportPresetFormat.PDF_EXPORT_PRESETS_FORMAT
ExportPresetFormat.PRINTER_PRESETS_FORMAT
ExportPresetFormat.FLATTENER_PRESETS_FORMAT
ExportPresetFormat.DOCUMENT_PRESETS_FORMAT
The type of preset to import.
fromFileThe file to import presets from.

void importStyles (format: ImportFormat, from: File)
Import styles.

ParameterTypeDescription
formatImportFormat:
ImportFormat.CHARACTER_STYLES_FORMAT
ImportFormat.PARAGRAPH_STYLES_FORMAT
ImportFormat.TEXT_STYLES_FORMAT
ImportFormat.TOC_STYLES_FORMAT
The type of styles to import.
fromFilean InDesign file to import from

void loadXMLTags (from: File)
Loads a set of XML markup tags from the specified file.

ParameterTypeDescription
fromFileThe path to the file that contains the tags.

any open (from: any[, showingWindow: bool=true])
Opens a document, book, or library.

ParameterTypeDescription
from Array of Files
File
The file path to the file to open. Can accept: File or Array of Files.
showingWindowboolIf true, opens the document in a window. If false, the document is opened but is not displayed in a window. (Optional) (default: true)

void paste ()
Pastes data from the clipboard into the active document window.

void pasteInPlace ()
Pastes data from the clipboard into the active document window at the same position that the data held in its original document.

void pasteInto ()
Pastes data from the clipboard into the selected object in the active document window.

void print (from: any[, printDialog: bool][, using: any])
Prints the specified file(s).

ParameterTypeDescription
from Array of Files
File
One or more file paths. Can accept: File or Array of Files.
printDialogboolWhether to invoke the print dialog (Optional)
usingPrinterPreset
PrinterPresetTypes
Printer preset to use. Can accept: PrinterPresetTypes enumerator or PrinterPreset. (Optional)

void quit ([saving: SaveOptions=SaveOptions.ASK])
Quits the application.

ParameterTypeDescription
savingSaveOptions:
SaveOptions.NO
SaveOptions.ASK
SaveOptions.YES
The option to use for saving changes to open documents before quitting. (Optional) (default: SaveOptions.ASK)

void saveXMLTags (to: File)
Saves the XML markup tags as an XML file.

ParameterTypeDescription
toFileThe name and location of the XML file.

Array of Text search ([for: string][, wholeWord: bool][, caseSensitive: bool][, replacingWith: string][, withFindAttributes: Object][, withChangeAttributes: Object])
Look for occurrences of text that matches specific criteria

ParameterTypeDescription
forstringWhat to look for (Optional)
wholeWordboolIf true, then disregard text embedded within a larger word (Optional)
caseSensitiveboolIf true, then search only for text that matches case (Optional)
replacingWithstringWhat to replace the found text with, either a string or a special character (Optional)
withFindAttributesObjectA record of find preference settings to use (Optional)
withChangeAttributesObjectA record of change preference settings to use (Optional)

void select (selectableItems: any[, existingSelection: SelectionOptions=SelectionOptions.REPLACE])
Select one or more objects.

ParameterTypeDescription
selectableItems Array of Objects
NothingEnum
Object
The object(s) to select. Can accept: Object, Array of Objects or NothingEnum enumerator.
existingSelectionSelectionOptions:
SelectionOptions.ADD_TO
SelectionOptions.REMOVE_FROM
SelectionOptions.REPLACE
How to handle the existing selection (Optional) (default: SelectionOptions.REPLACE)

void tileWindows ()
Tiles all document windows.

Element of

Application.parent

Book.parent

ButtonPreference.parent

ChangePreference.parent

CharacterStyle.parent

ClipboardPreference.parent

Color.parent

ColorSetting.parent

DashedStrokeStyle.parent

DataMergeOption.parent

Dialog.parent

DictionaryPreference.parent

DisplayPerformancePreference.parent

DisplaySetting.parent

Document.parent

DocumentPreference.parent

DocumentPreset.parent

DottedStrokeStyle.parent

EPSExportPreference.parent

EPSImportPreference.parent

ExcelImportPreference.parent

FindPreference.parent

FlattenerPreset.parent

Font.parent

GalleyPreference.parent

GeneralPreference.parent

Gradient.parent

GridPreference.parent

GuidePreference.parent

IMEPreference.parent

ImageIOPreference.parent

IndexOptions.parent

Ink.parent

JPEGExportPreference.parent

LanguageWithVendors.parent

LayoutAdjustmentPreference.parent

LayoutWindow.parent

Library.parent

MixedInk.parent

MixedInkGroup.parent

NotePreference.parent

PDFExportPreference.parent

PDFExportPreset.parent

PDFPlacePreference.parent

PackageForGoLivePreference.parent

ParagraphStyle.parent

PasteboardPreference.parent

PolygonPreference.parent

PrinterPreset.parent

SVGExportPreference.parent

ScriptPreference.parent

SpellPreference.parent

StoryExportPreference.parent

StoryWindow.parent

StripedStrokeStyle.parent

StrokeStyle.parent

Swatch.parent

TOCStyle.parent

TaggedTextExportPreference.parent

TaggedTextImportPreference.parent

TextDefault.parent

TextExportPreference.parent

TextImportPreference.parent

TextPreference.parent

Tint.parent

TransformPreference.parent

TransparencyPreference.parent

TrapPreset.parent

UserDictionary.parent

ViewPreference.parent

Window.parent

WordRTFImportPreference.parent

XMLExportMap.parent

XMLExportPreference.parent

XMLImportMap.parent

XMLImportPreference.parent

XMLTag.parent

XMLViewPreference.parent

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