3
Scripting Features
This chapter covers scripting techniques that relate to InCopy's scripting environment. Almost every other
object in the InCopy 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:
➤
The
scriptPreferences
➤
Getting a reference to the executing script.
➤
Running scripts in prior versions of the scripting object model.
➤
Using the
➤
Running scripts at InCopy start-up.
➤
Controlling the ExtendScript engine in which scripts execute.
We assume you already read
scripts in the scripting language of your choice.
Script preferences
The
scriptPreferences
The following table provides more detail on each property of the scriptPreferences object:
Property
EnableRedraw
scriptsFolder
scriptsList
object and its properties.
method to run scripts.
doScript
Chapter 2, "Getting Started"
object provides objects and properties related to the way InCopy runs scripts.
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], ...]
fileName
Where
to the script. You can use this feature to check for the existence of a script
in the installed set of scripts.
and know how to write, install, and run InCopy
is the name of the script file and
filePath
is the full path
19