Hi,
I have a vast number of Freehand 7 files that I need to convert to EPS. I have a script (below) that -almost- works, using illustrator.
It breaks down, however, when a message comes up in Illustrator asking me to choose RGB or CMYK (the files have both, apparently).
I’m using Tiger, if that helps…
I found a script at the Freehand Source… but for some reason it doesn’t save the files…
Could someone take a look at this script and tell me what’s wrong?
– Processes all files in folders dropped on this script
– (when saved as an applet) and save each Illustrator file as a eps file
on run
tell me to open {choose folder}
end run
on open droppedItems
set destinationFolder to choose folder with prompt “Destination folder?”
repeat with anItem in droppedItems
tell application “Finder”
– Make sure each item processed by this script is a folder
if class of item anItem is not folder then
– Not a folder, notify the user of the error
display dialog “Please drop only folders on this script”
else
– It is a folder, so get the Illustrator files in it and process them
set fileList to ¬
(every file of anItem) as alias list
end if
end tell
– See eps save options section for isolated example of this handler
SaveFilesAsEPS(fileList, destinationFolder)
end repeat
end open
– fileList is a list of aliases to Illustrator files
– destinationFolder is an alias to a folder where the eps files are to be saved
on SaveFilesAsEPS(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 & “.eps”
tell application “Illustrator CS”
set user interaction level to never interact
open aFile forcing RGB
save current document in file newFilePath as eps ¬
with options {class:EPS save options, compatibility:Illustrator 11, preview:color Macintosh, include document thumbnails:false, embed all fonts:false, CMYK PostScript:true, PostScript:level 2}
close current document saving no
end tell
end repeat
end SaveFilesAsEPS