• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sorting Lists???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sorting Lists???


  • Subject: Re: Sorting Lists???
  • From: has <email@hidden>
  • Date: Sat, 22 Mar 2003 20:46:09 +0000

Jakob Peterhdnsel wrote:

I would like to sort a list.

List looks like this:
(*1, Library, 2, 80s Music, 3, ...*)

It's 42 items: {n, "itemname"}

I would - surprise - like to sort the list in alphabetic order by the
'itemname'

Using the quicksort library from www.applemods.com (source code only, so you'll need to cut-n-paste it into a script), and the listLib library from my site:

-------
prop ListLib : load script (alias "your path to the listLib file")
prop SortLib : load script (alias "your path to the quicksort file")

set theList to {1, "Library", 2, "80s Music", 3, ...}

ListLib's unflattenFlatList(theList)
SortLib's quickSort({Values:result, Weights:{2, 1}})
ListLib's flattenComplexList(result)
-------

has
--
http://www.barple.pwp.blueyonder.co.uk -- The Little Page of AppleScripts
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Sine of the times: Much better window shaker
  • Next by Date: Re: How to make a background applet ?
  • Previous by thread: Re: Sorting Lists???
  • Next by thread: Re: Sorting Lists???
  • Index(es):
    • Date
    • Thread