Advertisement


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
1
3
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.

2013/04/01
3
4/1/2013 9:49:00 PM