Hi Everyone
I have a scriplet to save Illustrator, which works fine if I hard coded the compatibility into the save options, ie compatibility:Illustrator 13. However, if I get a variable and try to use that it doesn’t work. The reason I want to do this is because sometimes we have to backsave our Illustrator files for a particular commercial printer.
When I look at the events and replies in Applescript Editor it shows quote marks around the bit I want to insert.
I could probably do this by running if and else if statements but would like to know if it is possible to use a variable in the save options.
tell application "Adobe Illustrator"
set thisDoc to current document
set filePath to the file path of thisDoc
set thisDocVersion to short version of (info for filePath)
set thisDocVersion to ("Illustrator " & thisDocVersion)
-- problem line starts
save thisDoc in file (filePath as string) as Illustrator with options {class:Illustrator save options, compatibility:thisDocVersion, embed ICC profile:true, save multiple artboards:true, PDF compatible:false}
-- problem line ends
end tell
Model: 2 x 2.8 GHz Quad-Core Intel Xeon
AppleScript: 2.1.2
Browser: Firefox 3.6.14
Operating System: Mac OS X (10.6)