What I want to do is sort multiple times on multiple list quickly, At the moment I’m get data from a non database source, like the finder. Put in Filemaker, do the sort and bring back top Applescript. What I want to do is keep the orginal lists (memory issues) and rearrange just an index. Then I could repeat with i in IndexList and get info from multiple list.
There this great merge sort. Which sort the actual list.
I made this example.
set CityList to {"Auckland", "New York", "Hamilton", "Auckland", "New York"}
set SubrubList to {"City", "Kings", "City", "Archhill", "City"}
mergeSort(CityList, 1, -1)
CityList
--Handler from merge sort page go here
Get to:
Auckland
Archhill
City
Hamilton
City
New York
City
Kings
which is SortedIndexList = {4,1,3,5,2}
It like a reference or pointer method.
In the real world there’s, by country, then by city, then by suburb, then by street, then by number, then by flat, then by room, then by bed, then by side. LOL get the point.
And in the real world around 500 Items in 6 List. Inside AppleScript Limits.
May be ScriptDB. But I like to use Applescript becuase of releasing to to others at no cost, FileMaker runtimes are a pain.
Would be useful for files, by file type, then by date or size. Get the point.
See want people have to say before I go modifing merge sort myself.