Sunday, November 29, 2020

#1 2020-10-28 10:23:31 pm

harges
Member
From:: San Francisco, CA
Registered: 2003-03-15
Posts: 95

Adobe Illustrator Save Artboards as EPS Path Problem

Help. I've gotten rusty at Apple Script and can't solve the following problem.

I was writing a batch script to save a specific artboard from an Illustrator file as an .eps. All's good except something with the path name. The script below will save the artboard eps from the first file in the source folder and then fail with a dialog of "Adobe Illustrator got an error: File/Folder expected." I can't understand why the path works the first time but not after.

Applescript:


set ATID to AppleScript's text item delimiters
set AppleScript's text item delimiters to {"."}

tell application "Finder"
   set source_folder to folder of the front window
   set theFiles to every file of source_folder
   set theSource to source_folder as text
end tell

repeat with i from 1 to count of theFiles
   set thisFile to item i of theFiles
   set thisName to name of thisFile
   
   set thisNoExtName to text item 1 of thisName
   set thePath to (theSource & thisNoExtName & ".eps") as text
   
   open thisFile
   
   tell application "Adobe Illustrator"
       tell current document
           save as eps in file thePath with options {class:EPS save options, save multiple artboards:true, artboard range:2}
       end tell
       close current document saving no
       set thePath to ""
   end tell
   
end repeat
set AppleScript's text item delimiters to ATID

Offline

 

#2 2020-10-28 11:38:23 pm

harges
Member
From:: San Francisco, CA
Registered: 2003-03-15
Posts: 95

Re: Adobe Illustrator Save Artboards as EPS Path Problem

False alarm. I’m going to sidestep Apple Script and Batch an Illustrator action to achieve the same end.

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)