Randomization is a handy thing in a vector drawing program. It's surprising how few features provide for it. The one happy exception in Illustrator is the Random checkbox in the Transform Each dialog. But too often, other kinds of randomization has to be tediously and manually faked.

Link to zip archiveDownload The .zip Archive

That's odd, because it seems that just about every programming or scripting language, including Javascript, provdes a pre-built random function. The object-oriented nature of vector drawing programs lends itself to use of the random function. Efficiency constructs like Symbol instances that can easily be swapped throughout a file also play handily into applications for randomization.

Link to example image JET_FillRandom.jsx
Randomly distributes a user-defined number of copies of one object within the rectangular bounds of another object.

To Use: Select two objects. The rearmost object is duplicated and randomly distributed within the rectangular bounds of the frontmost object. For additional flexibility, convert the rearmost object to a Symbol Instance before running the script. That will make your file more efficient, and will also let you leverage the other advantages of Symbols, such as swapping out all the Instances with another Symbol at once.


Link to example image JET_RandomBaselineShift.jsx
Randomly sets the baseline shift of each character in a single selected textFrame.

To Use: The topmost selected object must be a text object. It can be pointType, areaType, or pathType, but it must be normally selected as an object, not as a range of test. Select the text object and then run the script.


Link to example image JET_RandomFillSwatches.jsx
Randomly fills selected paths with swatches already defined in the document.

Select one or more paths. Run the script. The fills of the selected paths are randomly selected from the Swatches present in the Swatches Panel.


Link to example image JET_RandomOpacity.jsx
Randomly sets the opacity of the selected objects.

To Use: Select one or more objects. Run the script. The opacity of each selected objects is randomly set a value between 0% and 100%.


Link to example image JET_RandomReplaceSymbol.jsx
Randomly replaces selected Symbol Instances with Symobls already defined in the document.

To Use: Select one or more Symbol Instances. Run the script. The parent Symbol of each selected Instance is randomly changed to a Symbol defined in the Symbols Panel.