This does appear to be a bug. The error occurs when the `save` command’s `with options` parameter is a record containing a `embed icc profile` property.
Your command is valid but fails on AI 28.7.6 and AI 29.5 (macOS 15.3.2):
set mynewfile to "/Users/jsmith/test.ai" as POSIX file -- change this to your actual path
tell application "Adobe Illustrator"
save document 1 in mynewfile as Illustrator with options ¬
{class:Illustrator save options, flatten output:preserve appearance, embed icc profile:false} -- this errors!
end tell
However this works:
set mynewfile to "/Users/jsmith/test.ai" as POSIX file -- change this to your actual path
tell application "Adobe Illustrator"
save document 1 in mynewfile as Illustrator with options ¬
{class:Illustrator save options, flatten output:preserve appearance} -- this works
end tell
In addition, the “Can’t get document 1” error message is incorrect as the problem is the `with options` parameter, so that’s a second bug. (I’ll assume you do have at least one document open. Ironically, if you don’t, AI correctly returns an error but this time the message is “File/Folder expected” instead of “Can’t get document 1”, so that’s three bugs in the `save` command!)
You can file your bug report here:
https://illustrator.uservoice.com/