make new illustrator document with a name

Hello,

I want to open new documents based on the current date, but I can’t even seem to get illustrator to make a new document with ANY name. I figure I’m missing something simple, but trying to find information is like pulling teeth.

I’m just using:

Tell application “illustrator”
make new document with properties {name:“new name”}
end tell

I keep getting new documents titled “Untitled-…” with no errors, but no new name, either.

What am I missing?

Thanks!

Hi,

according to Illustrator’s dictionary the property name is read only.
You can set the name by saving the file to disk


set desktopPath to path to desktop as text
tell application "Adobe Illustrator"
	set newDocument to make new document
	save newDocument in desktopPath & "new name.ai"
end tell

Thanks Stefan!

As usual, I’m thinking backwards… I knew the name was r/o, but somehow I was trying to assign a name before the save, like you can do with textedit when opening a new document. I thought maybe I just wasn’t telling applescript the correct way to go about it.

Thanks alot for the info. Sometimes I need a readjustment in the right direction!