Site logo

Sorting

Sort objects by geometric bounds function

Sort file names function for Mac (workaround for a Mac OSx bug)

Collator module — by Marc Autret — a simplified implementation of Unicode Collation Algo (UCA) in pure ExtendScript. Supports 60+ tailored languages! Test and explore it

SmartSort by Marc Autret
a pure paragraph sorter, that is, it actually reorders text elements without altering any formatting or style attribute that may exist at the character scale.

Language-aware paragraph sorter by Peter Kahrel

TextSortParagraphs by Marc Autret — Quick paragraph sorter

Alphabetical Sort in JavaScript (and InDesign) by Marc Autret

Sort an array of the “Levenshtein Distance” with best performance in Javascript

Timesort — the fastest sorting algorithm you've never heard of

CustomTextSortParagraphs function by Marc Autret
Now supports a 3rd argument 'extraOrderFunc' that can work wonders… like re-ordering paragraphs according to a custom *style* sequence! Click here to see.

Up2Bottom and Left2Right Sorting Algorithm — addressing (weakly) sparse rectangles
Usage: Select the objects, then run the script

Sorting two arrays according to one

Sorting functions

See also functions for sorting arrays here