1 Reply Latest reply on Mar 1, 2012 10:36 AM by Muppet Mark

    Load default/preset values from external file?

    badaboom_55 Level 1

      Hello all,


      I have several Illustrator JavaScripts that I've written with the ESTK.

      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!