AppleScript in Illustrator

Does anyone know where I can get a list of all the API’s for AppleScript in Illustrator?

Thanks. I ended up purchasing the book “Applescript The Missing Manual”. So far this has been a big help. I also found out that I can view the API’s for just about any program through Script Editor under File Menu - Dictionary. Now I’m attempting to write a script that copies a layer from an unopened illustrator document and past it into another.

Here’s my code so far

tell application “Illustrator CS”
copy layer “layer1” of “Macintosh”
end tell

When I test the script it says that it cannot maker “layer1” into an integer? Have any idea’s why this script isn’t working?

Hi I have not too much experience on applescript. And most often I have developed a program for Illustrator.

First Open the document through choose file or hard code path in the program, then copy Layer 1. I think it will be correct.

when you purchase got Applescript:The missing manual please send me the pdf of it. Because it is not available in India.


Here’s how I do this.

tell application "Finder"
	set fileToOpen to file "" of desktop
end tell
tell application "Illustrator CS"
	open fileToOpen
	set thisDoc to current document
	set selection to every page item of layer "Layer 1" of thisDoc
	copy selection
	set docref to make new document
end tell

Hope this helps.

Thanks for the script - PreTech.

Macrajeev - Sorry I don’t have the book available in PDF.