Question
Load CEP from javascript file
I'm running a javascript file from apple script.
I would like to load CEP from the js file. Here is what I'm attempting to do but it's not working. I'm getting this error:
Adobe Illustrator got an error: Error 2: window is undefined.First I load my js file in illustrator like so:
set jsFilePath to POSIX file "/Library/Application Support/Adobe/CEP/extensions/CEP_HTML_Test_Extension-9.0/js/autoRunTemplates.js"
tell application "Adobe Illustrator"
launch
do javascript jsFilePath
end tell
Then I attempt to load the CEP file. (Normally I load this in html).
function runScript() {
#include './CSInterface.js'
}
runScript();
My goal is to run a javascript file from apple script to run some CEP type scripting in illustrator.