Can I include / reference external scripts and libraries within my Adobe Illustrator .jsx script?


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 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?

7/7/2014 2:23:00 AM

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.

4/1/2013 9:49:00 PM