using swatches and symbols libraries in illustrator


i need a script that can access swatches and symbols from an external library, like the pantone library, or a custom set of symbols for example. any ideas? i’ve looked everywhere but can’t get it to work. in fact, I can’t even get illustrator to even open a library. the “open as swatches library” doesn’t seem to work no matter where i put it in the code.

here’s what i have so far:

tell application "Adobe Illustrator"
	set thecolorlist to {}
	tell application "Finder"
		set swatchfile to "Mac HD:Users:jgoodwin:Library:Application Support:Adobe:Adobe Illustrator CS4:en_US:Swatches:Special Inks.ase" as alias
	end tell
	open swatchfile as alias with options {as:swatches library}
end tell

any help would be greatly appreciated.


I don’t think that you can directly do what you want with scripting Illustrator. My dictionary (CS2) does NOT even list ‘library’ I can’t open Color Book .acb Files. If I want to save swatches then they are saved by default in .ai file. What I have had to do before now is open a template file and duplicate objects with applied styles, brushes etc. from one doc to another (NOT very elegant) symbols you need to place a instance of then dupe over. But may be things have moved on with this app (I would like to hope so). My dictionary lists under open.

[with options any] : options for opening a particular type of file. ‘Any’ seams some what vague to me!!