Scripting Features. Adobe InDesign CS6
Reklama
Reklama
2
Scripting Features
CS6 Updated
Chapter Update Status
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:
The scriptPreferences
object and its properties.
Getting a reference to the executing script.
Running scripts in prior versions of the scripting object model.
Using the doScript
method to run scripts.
Working with script labels.
Running scripts at InDesign start-up.
Controlling the ExtendScript engine in which scripts execute.
We assume that you have already read Adobe InDesign Scripting Tutorial and know how to write, install, and run InDesign scripts in the scripting language of your choice.
Script Preferences
The scriptPreferences
object provides objects and properties related to the way InDesign runs scripts.
The following table provides more detail on each property of the scriptPreferences object:
Property enableRedraw scriptsFolder scriptsList
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.
13
Preuzimanje
Reklama