Listing preflight rules. Adobe CS5 InDesign
Mainos
Mainos
C
HAPTER
10: Working with Preflight
Importing a Preflight Profile 151
Listing preflight rules
This script fragment shows how to list all preflight rules in a profile. For the complete script, see
ListPreflightRules.
tell application "Adobe InDesign CS5"
-- Assume the [Basic] profile exists.
set myProfile to item 1 of preflight profiles set myRules to preflight profile rules of myProfile set ruleCount to count of myRules set str to "Preflight rules of " & name of myProfile & ": " repeat with i from 1 to ruleCount if i > 1 then set str to str & ", " end if set str to str & name of item i of myRules end repeat display alert str end tell
Listing preflight data objects
This script fragment shows how to list all preflight data objects in a profile rule. For the complete script, see
ListPreflightDataObjects.
tell application "Adobe InDesign CS5" set myProfile to item 1 of preflight profiles set myRule to item 1 of preflight profile rules of myProfile set dataObjects to rule data objects of myRule set dataObjectCount to count of dataObjects set str to"Preflight rule data objects of " & name of myProfile &"." &name of myRule
&": " repeat with i from 1 to dataObjectCount if i > 1 then set str to str & "; " end if set myObject to item i of dataObjects set str to str & name of myObject & ", " set str to str & data type of myObject & ", " set str to str & data value of myObject end repeat display alert str end tell
Importing a Preflight Profile
To import a preflight profile from the Preflight panel, choose Preflight Panel > Define Profiles, then choose
Load Profile from the drop-down menu in the Preflight Profiles window.
Lataa
Mainos