Here is the dictionary entry
importFile (verb)Import the file into current Ai document (from Adobe Illustrator Suite)
COMMAND SYNTAX
importFile document ¬
from file ¬
is linked boolean
Here is my script
tell application "Adobe Illustrator"
set theDoc to current document
set itemRef to importFile theDoc ¬
from file ¬
"Macintosh HD:Users:chrisndeca:Downloads:helloworld.jpg" without is linked
end tell
This script running with Illustrator 25.3 gives me a Parameter Error every time it is run. I have narrowed the error down to being with the “file” parameter and not the document parameter. I have tried Posix File, I have tried posix path, I have tried an alias for the file parameter, but none of them work. What the heck am I missing?
Or is Illustrator just broken when it comes to “importFile”?