Advertisement
applehelpwriter

Adobe Illustrator export as JPEG

Mar 27th, 2014
521
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --this script exports a JPEG for each open Adobe Illustrator document
  2. --Destination is the same folder as the AI document
  3. --it then closes all open AI documents without saving
  4.  
  5. tell application "Adobe Illustrator"
  6.     set theDocuments to every document
  7.    
  8.     repeat with i from 1 to the count of theDocuments
  9.        
  10.         set thePath to (file path of document i) as text
  11.         set thePath to text 1 thru -4 of thePath
  12.        
  13.         set theAlias to (thePath & ".jpg") as text
  14.         set theJPGExportOptions to {class:JPEG export options, antialiasing:false, quality:100, optimization:true}
  15.        
  16.         set current document to document i
  17.         export front document as JPEG to theAlias with options theJPGExportOptions
  18.     end repeat
  19.     close every document saving no
  20. end tell
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement