I am having trouble getting AppleScript to run this piece of code. I know I am just not putting writing it correctly but have tried it these to ways with no success.
on openSwatch(fileToOpen)
tell application "Adobe Illustrator"
activate
open POSIX file fileToOpen with options {as:swatches library}
end tell
end openSwatch
and
on openSwatch(fileToOpen)
tell application "Adobe Illustrator"
activate
open POSIX file fileToOpen as swatches library
end tell
end openSwatch
Any help would be greatly appreciated. I am trying to call on the swatches library I open rather then having a script build a new set of swatches every time. In other words it makes a document opens a library called "Animals" then builds a square and fills it with "Cheetah"
Any other ideas would be good as well