A lot of these scripts involve resizing the artboard or artwork to specific sizes.
Instead of forcing the user to manually input the dimensions they want into text fields, I just stored a half-dozen or so "presets" in an array.
Then they can select one of the presets from a dropdownlist, or go ahead and input a custom size.
These presets are the same for multiple "resize" scripts, so it would be nice to store those presets in a separate file (i.e. presets.jsx) that my resize scripts could reference, so when I need to add or change a preset, I could just go to that one shared file, and all the scripts would be updated.
Is it possible to do that?
If it is, a quick example of how to load the variables from another file would be helpful, thanks!
The toolkit allows for modular scripting with:
Allows you to use common functions etc.
But you could probably just do this with plain old read and write file…