Adobe 26001360 Scripting Guide - Page 127
Example 22.1, the save option class.
UPC - 718659321840
View all Adobe 26001360 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 127 highlights
Adobe Illustrator CS Scripting Guide 127 Example 22.1 This handler processes a folder of Illustrator files, saving each with Illustrator 7 compatibility. Note that the class property is specified in the record to ensure that Illustrator can determine the save option class. -- fileList is a list of aliases to Illustrator files -- destinationFolder is an alias to a folder where the Illustrator -- files are to be saved on SaveFilesAsIllustrator8(fileList, destinationFolder) set destinationPath to destinationFolder as string repeat with aFile in fileList tell application "Finder" to ¬ set fileName to name of aFile set newFilePath to destinationPath & fileName & ".ai8" tell application "Illustrator CS" open aFile save current document in file newFilePath as Illustrator ¬ with options {class:Illustrator save options ¬ , compatibility:Illustrator 8 ¬ , flatten output:preserve appearance} close current document saving no end tell end repeat end SaveFilesAsIllustrator8 -- Call handler set sourceFolder to choose folder with prompt "Source folder?" tell application "Finder" to ¬ set fileList to every file of folder sourceFolder as alias list set destinationFolder to choose folder with prompt "Destination folder?" SaveFilesAsIllustrator8(fileList, destinationFolder) 12 Aug 03