Hi All
I got every day some eps file and I open it and saved in the latest version with the following properties
Document Version: 10
File Preview: 8-bit (Mac)
Include Document Thumbnail: True
Embed all fonts: True
I developed a program but I am unable to set the above properties.
See my code below:
tell application "Finder"
set thePath to (choose folder) as text
set theFile to name of every file in folder thePath whose (name ends with ".eps")
end tell
tell application "Adobe Illustrator 10.0.3"
activate
set tot to count of theFile
repeat with i from 1 to tot
set fn to item i of theFile
set fnm to thePath & fn
open file fnm
set myDoc to document 1
[b] --save myDoc in file fnm as EPS with properties {class:EPS save options}
[/b]
close myDoc saving yes
end repeat
-- quit application
end tell
The bolde matter I am unable to set.
Under there is another program which I took from this site, but it also not working
And the problem lies in the set user interaction
tell me to open {choose folder with prompt "Select the folder containing the files you wish to convert to Illustrator EPS."}
on open myFinderList
repeat with myFinderItem in myFinderList
tell application "Finder" to set myItemIsFolder to (kind of myFinderItem = "folder")
if myItemIsFolder then
tell application "Finder" to set myFolderContents to (every item of myFinderItem)
open myFolderContents
else
with timeout of 864000 seconds
tell application "Adobe Illustrator 10.0.3"
set user interaction level to interact with self
open myFinderItem as alias forcing CMYK
set myDocumentName to name of document 1 & ".eps"
set myDocumentPath to (file path of current document) as string
end tell
end timeout
doProcessDocument(myDocumentName)
end if
end repeat
end open
on doProcessDocument(myDocumentName)
saveDocument(myDocumentName)
end doProcessDocument
on saveDocument(myDocumentName)
with timeout of 864000 seconds
tell application "Adobe Illustrator 10.0.3"
set myDocumentPath to (file path of current document) as string
save current document in file myDocumentPath as eps with options {class:EPS save options, preview:color Macintosh, include document thumbnails:false, embed all fonts:false, CMYK PostScript:true, PostScript:level 2}
delay 1
close current document saving no
end tell
end timeout
end saveDocument
with timeout of 864000 seconds
display dialog "The file(s) have been converted." buttons {"OK"} default button 1
if button returned of the result is "OK" then
tell application "Adobe Illustrator 10.0.3"
quit
end tell
end if
end timeout
--set user interaction level to never interact
And honestlly I am not a very perfect to understand whole the program.
Regards,
Rajeev