Had a great applescript that opened .eps files and saved them as .ai in CMYK that no longer works in Illustrator CC 2015.
Have tried a lot with tweaking and googling but only get errors. Can anyone see whats wrong?
Script should
¢ Open selected file without prompt (doing this through Hazel)
¢ Preferrably select all artwork and convert selection to new work-area
¢ Save as .ai in CMYK
set docRef to theFile as string
set outputFolder to "/Users/AF/Downloads/ UT/" as string
tell application "Adobe Illustrator"
activate
open (theFile as alias) without dialogs
tell front document
set docRef to the current document
set docName to name of docRef
set newFilePath to outputFolder & "v_" & docName
try
set (spots whose name does not contain "White")'s color type to process color
end try
save current document in file newFilePath as Illustrator with options {color space:CMYK, embed ICC profile:true}
end tell
close front document saving no
end tell
I’ve had a quick look at the dictionary, a slightly older version than yours, and it doesn’t look like color space is one of the ‘Illustrator’ save options. It’s there in the core suite and other save options.
Not sure if you need to change the color space of the document before you save it as an Illustrator format?
set FileSample to theFile as string
set MyFolderA to "/Users/AF/Desktop/" as string
tell application "Adobe Illustrator"
activate
open (theFile as alias) without dialogs
try
do javascript file "/Users/AF/Dropbox/CMYK.jsx" with arguments {1, 2}
end try
tell front document
set docBaseName to name
set newFileName to (MyFolderA & docBaseName & ".ai") as string
end tell
save front document in file newFileName as Illustrator
close front document saving no
end tell
The script “CMYK.jsx” is a javascript with only this content in the file:
app.executeMenuCommand(‘doc-color-cmyk’);