Scripting Features. Adobe CS5 InDesign
Advertisement
Advertisement
2
Scripting Features
This chapter covers scripting techniques related to InDesign’s scripting environment. Almost every other object in the InDesign scripting model controls a feature that can change a document or the application defaults. By contrast, the features in this chapter control how scripts operate.
This document discusses the following:
X
The script preferences
object and its properties.
X
Getting a reference to the executing script.
X
Running scripts in prior versions of the scripting object model.
X
Using the do script
method to run scripts.
X
Working with script labels.
X
Running scripts at InDesign start-up.
We assume that you have already read Adobe InDesign CS5 Scripting Tutorial and know how to write, install, and run InDesign scripts in the scripting language of your choice.
Script Preferences
The script preferences
object provides objects and properties related to the way InDesign runs scripts.
The following table provides more detail on each property of the script preferences object:
Property
enable redraw scripts folder scripts list
Description
Turns screen redraw on or off while a script is running from the Scripts panel.
The path to the scripts folder.
A list of the available scripts. This property is an array of arrays, in the following form:
[[fileName, filePath], ...]
Where
fileName
is the name of the script file and
filePath
is the full path to the script. You can use this feature to check for the existence of a script in the installed set of scripts.
11
Download
Advertisement