• 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: John Delacour <email@hidden>
  • Date: Sat, 22 Mar 2003 22:21:46 +0000
  • Mac-eudora-version: 6.0a13

At 6:58 pm +0100 22/3/03, Jakob Peterhdnsel wrote:

Hi All.

I would like to sort a list.

List looks like this:
(*1, Library, 2, 80s Music, 3, De allerbedste, 4, Top 25 Most Played,
5, Sidst spillet, ...
It's 42 items: {n, "itemname"}

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

set ls to "5,e,4,d,2,c,3,a,1,b"
do shell script "perl -e '$list = qq~" & ls & "~ ;
%hash = split q~,~, $list ;
@values = sort (values %hash) ;
for $key (sort keys %hash) {
print qq~$key $values[$i]$/~ ;
$i++ ;}'"

If certain characters appear in ls, then you will have to modify the script to write and read to a file.

JD
_______________________________________________
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.

  • Follow-Ups:
    • Re: Sorting Lists???
      • From: John Delacour <email@hidden>
References: 
 >Sorting Lists??? (From: Jakob Peterhänsel <email@hidden>)

  • Prev by Date: Re: How to make a background applet ?
  • Next by Date: Re: Sorting Lists???
  • Previous by thread: Sorting Lists???
  • Next by thread: Re: Sorting Lists???
  • Index(es):
    • Date
    • Thread