Can I include / reference external scripts and libraries within my Adobe Illustrator .jsx script?
Can I include / reference external scripts and libraries within my Adobe Illustrator .jsx script?
Question
We're writing a bunch of .jsx
scripts, and in each one I have to mock out some functions so I can use things like Array.map()
and String.trim()
, but I don't want to have to include that code at the top of every script.
Is there a way to "include" / reference other scripts or libraries inside of a .jsx
script file?
2014/07/07
Popular Answer
Not sure if this will work for Illustrator, but in Photoshop I've had success using this method in a configurator panel:
#include "coreFunctions.jsx";
saveImage("jpg", "", "web", "", "");
The above code is the contents of a file called "[email protected]", which calls the function "saveImage" (a user created function), declared in the coreFunctions.jsx file.
2013/04/01