Indesign Scripting Reference
home | search | Links
JavaScript >> Application

Application

The InDesign application.

Application Properties

Property Type Access Description
activeDocument Document r/w The active (front-most) document.
activeScript File read The file path to the script running from the Scripts palette.
activeWindow Window, LayoutWindow, StoryWindow r/w The active (front-most) window.
anchoredObjectDefaults AnchoredObjectDefault read Anchored object defaults.
anchoredObjectSettings AnchoredObjectSetting read Anchored object settings for the object.
autoCorrectPreferences AutoCorrectPreference read Auto correct preferences.
autoCorrectTables AutoCorrectTables read Auto correct tables.
baselineFrameGridOptions BaselineFrameGridOption read The baseline frame grid options.
books Books read All open books.
buttonPreferences ButtonPreference read Button preferences.
changePreferences ChangePreference, NothingEnum enumeration r/w The current change settings for InDesign’s find/change feature. This object corresponds to options found in the Find/Change panel (including the options in the Change Format Settings section of that panel).
characterStyles CharacterStyles read Character Styles.
clipboardPreferences ClipboardPreference read Clipboard preferences.
colors Colors read All colors.
colorSettings ColorSetting read Color management settings.
dashedStrokeStyles DashedStrokeStyles read Every dashed stroke style.
dataMergeOptions DataMergeOption read Data merge options.
diagnostics DiagnosticsObject read The Diagnostics object.
dialogs Dialogs read All dialogs.
dictionaryPreferences DictionaryPreference read User dictionary preferences. This object corresponds to the Dictionary panel of the Preferences dialog box.
displayPerformancePreferences DisplayPerformancePreference read Display performance preferences. This object corresponds to the Display Performance panel of the Preferences dialog box.
displaySettings DisplaySettings read Every display setting.
documentPreferences DocumentPreference read Document preferences. This object corresponds to the document panel of the Preferences dialog box.
documentPresets DocumentPresets read Every preset that contains all of the new document settings.
documents Documents read All open documents.
dottedStrokeStyles DottedStrokeStyles read Every dotted stroke style.
epsExportPreferences EPSExportPreference read EPS export preferences.
epsImportPreferences EPSImportPreference read EPS import preferences.
excelImportPreferences ExcelImportPreference read The application’s default Excel Import preferences. This object corresponds to the Excel Import dialog box (which appears when a user imports an Excel document and has turned on the Show Options option in the Place dialog box).
featureSet FeatureSetOptions enumeration read Feature set of the application (Roman or Japanese).
filePath File read The complete path to the folder that contains the application.
findPreferences FindPreference, NothingEnum enumeration r/w The current find settings for InDesign’s find/change feature. This object corresponds to options found in the Find/Change panel (including the options in the Find Format Settings section of that panel).
flattenerPresets FlattenerPresets read Every preset that contains the transparency flattener properties.
fonts Fonts read Every font.
footnoteOptions FootnoteOption read Footnote options.
fullName File read The file path to the application, including the file name.
galleyPreferences GalleyPreference read Story Editor preferences. This object corresponds to the Story Editor Display panel of the Preferences dialog box.
generalPreferences GeneralPreference read General preferences. This object corresponds to the General panel of the Preferences dialog box.
grabberPreferences GrabberPreference read Hand tool scrolling preferences. This object corresponds to the settings in the Scrolling section of the Display Performance panel of the Preferences dialog box.
gradients Gradients read All gradients.
gridPreferences GridPreference read Grid preferences. This object corresponds to the Grids panel of the Preferences dialog box.
guidePreferences GuidePreference read Guide preferences. This object corresponds to the Guides and Pasteboard panel of the Preferences dialog box.
imageIOPreferences ImageIOPreference read Image IO preferences.
imePreferences IMEPreference read Input Method Editor (IME) preferences.
indexGenerationOptions IndexOptions read The options controlling index generation. This object corresponds to the Generate index dialog box. (To display this dialog box, choose Generate index from the index palette menu).
inks Inks read Every InDesign ink.
jpegExportPreferences JPEGExportPreference read JPEG export preferences.
languagesWithVendors LanguagesWithVendors read Every language with vendors.
layoutAdjustmentPreferences LayoutAdjustmentPreference read The application’s default layout adjustment preferences. The properties in this object correspond to the options shown in the Layout Adjustment dialog box. (Choose Layout Adjustment from the Layout menu to display this dialog box).
layoutWindows LayoutWindows read Every layout window.
libraries Libraries read Every library.
locale Locale enumeration read The locale of the application.
marginPreferences MarginPreference read Margin preferences. These settings affect all new documents that you create, but have no effect on the margin preferences of existing documents. This object corresponds to the options found in the Margins and columns dialog box.
mixedInkGroups MixedInkGroups read All mixed ink groups.
mixedInks MixedInks read All mixed inks.
modalState Boolean read If true, a modal dialog (or alert) is active.
name String read The name of the object.
objectStyles ObjectStyles read Object Styles.
palettesVisible Boolean r/w If true, the palettes are displayed.
paragraphStyles ParagraphStyles read Paragraph Styles.
parent Object read The parent of the object.
pasteboardPreferences PasteboardPreference read Pasteboard preferences. The properties of this object correspond to the pasteboard-related options in the Guides and Pasteboard panel of the Preferences dialog box.
pdfExportPreferences PDFExportPreference read PDF export preferences.
pdfExportPresets PDFExportPresets read Every PDF export preset.
pdfPlacePreferences PDFPlacePreference read PDF place preferences.
placeableFileExtensions Array of Strings read A list of file types (extensions) that can be placed.
placeableFileTypes Array of Strings read A list of file types that can be placed.
polygonPreferences PolygonPreference read Polygon preferences. This object corresponds to the Polygon Settings dialog box. (To display this dialog box, double-click the Polygon tool in the Tools palette.).
printerPresets PrinterPresets read Every preset that contains all of the print settings.
properties An array of property names and values r/w Property that allows setting of several properties at the same time.
qaScriptingObject QAScript read QA scripting object.
redoHistory Array of Strings read A list of events in the redo queue.
redoName String read The name of the event at the top of the redo queue.
scriptArgs ScriptArg read Script arguments.
scriptPreferences ScriptPreference read Scripting environment preferences.
selection Object, Array of Objects, NothingEnum enumeration r/w The current selection.
spellPreferences SpellPreference read Spelling preferences. This object corresponds to the Spelling panel of the Preferences dialog box.
storyPreferences StoryPreference read Story preferences. This object corresponds to the Story palette. These settings affect all new documents, but have no effect on the story preferences in existing documents.
storyWindows StoryWindows read Every story window.
stripedStrokeStyles StripedStrokeStyles read Every stripe stroke style.
strokeStyles StrokeStyles read Every stroke style.
svgExportPreferences SVGExportPreference read SVG export preferences.
swatches Swatches read All swatches.
taggedTextExportPreferences TaggedTextExportPreference read Tagged text export preferences. This object corresponds to the Tagged Text Export dialog box, which appears when you export tagged text.
taggedTextImportPreferences TaggedTextImportPreference read Tagged text import preferences. This object corresponds to the Tagged Text Import dialog box (which appears when you import a tagged text file and have turned on the Show Options option in the Place dialog box).
testIsRunning Boolean read Whether a test is currently running.
testTimeAccumulator Real r/w QA test time accumulator property.
textDefaults TextDefault read The default text formatting for the application. This affects all new documents, and has no effect on existing documents.
textEditingPreferences TextEditingPreference read Text editing preferences.
textExportPreferences TextExportPreference read The text export preferences.
textFramePreferences TextFramePreference read Text frame preferences.
textImportPreferences TextImportPreference read The text import preferences.
textPreferences TextPreference read Text preferences.
tints Tints read All tints.
transformPreferences TransformPreference read Transform preferences.
transparencyPreferences TransparencyPreference read Transparency preferences.
trapPresets TrapPresets read Every InDesign trap preset.
undoHistory Array of Strings read The names of the events in the undo queue.
undoName String read The name of the most recent event in the undo queue.
unusedSwatches Array of Swatches read A list of unused swatches.
userColor Array of 3 Reals (0 - 255), InCopyUIColors enumeration (see table at end of chapter) r/w The user color for tracked changes and notes.
userDictionaries UserDictionaries read Every user dictionary.
userName String r/w The user name for tracked changes and notes.
version String read Version of the application.
viewPreferences ViewPreference read View preferences.
visible Boolean read If true, the application is visible.
windows Windows read Every window.
wordRTFImportPreferences WordRTFImportPreference read Word and RTF import preferences.
xmlExportMaps XMLExportMaps read Every style to XML tag mapping.
xmlExportPreferences XMLExportPreference read XML export preferences.
xmlImportMaps XMLImportMaps read Every XML tag to style mapping.
xmlImportPreferences XMLImportPreference read XML import preferences.
xmlPreferences XMLPreference read XML preferences.
xmlTags XMLTags read All XML tags.
xmlViewPreferences XMLViewPreference read XML view preferences.

Application Methods

Method Returns Description
activate Nothing Brings the application to the front.
cascadeWindows Nothing Arranges the open windows in a “cascade” (i.e., overlapping windows).
copy Nothing Copies the selection.
cut Nothing Cuts the selection.
deleteUnusedTags Nothing Deletes all unused XML markup tags.
doScript Any Type Runs a script. The script can be either a file or a string.
exportPresets Nothing Export the presets to a file.
getElements Array of Objects Resolve the object specifier.
importAdobeSwatchbookProcessColor Color Import a process color from a preloaded Adobe color book.
importAdobeSwatchbookSpotColor Color Import a spot color from a preloaded Adobe color book.
importFile Nothing Import a presets file into InDesign.
importStyles Nothing Import styles from a file.
loadSwatches Nothing Load swatches from a file.
loadXMLTags Nothing Load a set of XML tags from a file.
open Document, Book, Library or Array of Documents, Books or Libraries Opens a document, book, or library.
paste Nothing Pastes data from the clipboard.
pasteInPlace Nothing Paste data from the clipboard into front document window at the same position as the original.
pasteInto Nothing Pastes data from the clipboard into the selected object.
pasteWithoutFormatting Nothing Paste data without formatting from the clipboard into front document window.
place Nothing Places a file.
print Nothing Print one or more documents.
qatest String QA test event.
quit Nothing Quits the application.
redo Nothing Redo the last action.
saveSwatches Nothing Saves the specified swatches to a swatchbook file.
saveXMLTags Nothing Saves XML tags to a file.
search Array of Texts Searches for text and returns a list of text objects matching the search string and/or formatting specified by the find preferences. Search can also replace the text and/or formatting. This command corresponds to InDesign’s Find/Change feature.
select Nothing Selects the object.
tileWindows Nothing Arranges the open windows in a “tiled” layout (i.e., non-overlapping windows).
toSource String Generate JavaScript source that, if executed, will return the specified objects.
toSpecifier String Retrieve the object specifier.
undo Nothing Undo the last action.
updateFonts Nothing Forces a check for new fonts in the various Fonts folders.