Adobe 26001360 Scripting Guide - Page 135
Example 26.1, Illustrator can determine the export option class.
UPC - 718659321840
View all Adobe 26001360 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 135 highlights
Adobe Illustrator CS Scripting Guide 135 Example 26.1 This handler processes all Illustrator files in a specific folder, exporting each file as a mediumquality JPEG image. Note that the class property is specified in the record to ensure that Illustrator can determine the export option class. -- fileList is a list of aliases to Illustrator files -- destinationFolder is an alias to a folder where the JPEGs are to be exported on ExportFilesAsJPEGMedium(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 & ".jpg" tell application "Illustrator CS" open aFile export current document to file newFilePath as JPEG with options ¬ {class:JPEG export options ¬ , quality:60 ¬ , blur:0.5 ¬ , horizontal scaling:50.0 ¬ , vertical scaling:50 ¬ , matte:false} close current document saving no end tell end repeat end ExportFilesAsJPEGMedium -- 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?" ExportFilesAsJPEGMedium(fileList, destinationFolder) 12 Aug 03