This site aims to be the ultimate resource for Adobe Illustrator(c) scripting. Here you will find regularly updated collection of scripts for all your creative needs.
If you find yourself doing the same task again and again, or you have an idea how to optimise your  workflow – get in touch, and we will provide solution.

Organize

organize.jsx

A quick way to sort the selected items by a specific attribute.
For example, use this script to position elements from left to right based on their height. Another example is to change the group of elements in z-order based on volume area. More complicated, you can remap the height based on the x position. items can be sorted by (h)eight, (w)idth, (a)rea, (x)-axis, (y)-axis, (o)pacity, (z)-order) Sort directions are small-to-large, large-to-small, and random. Best used in conjunction with the Align palette to rearrange objects powerful method.