Javascript Error in AppleScript (Automator)
Hi Community,
I am trying to automate a workflow using Apple’s Automator program. I have a javascript that runs without issue when called from the File —> Scripts menu in Illustrator, but I get a cryptic error when I run the below workflow in Automator:
“Adobe Illustrator got an error: Error 25: Expected: ;.
Line: 1
-> Macintosh HD/Applications/Adobe Illustrator CC 2018/Presets/en_US/Scripts/Submit_Files.jsx”
My current workflow in Automator:
- I manually identify the files I want to work with in “Ask for Finder Items”
- “Open Finder Items” opens the files with “Adobe Illustrator CC 2018”
- Next, “Run AppleScript” calls the JSX script:
Tell application "Adobe Illustrator"
do javascript "Macintosh HD/Applications/Adobe Illustrator CC 2018/Presets/en_US/Scripts/Submit_Files.jsx"
end tell
- I get the above error. As noted above, the script runs fine in Illustrator so I know the issue is with my AppleScript. I get the same error in the terminal.
I have been searching and tinkering for hours to no avail. Can someone offer a pointer on what I might be doing wrong?
