• 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
Trimming down a list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trimming down a list


  • Subject: Trimming down a list
  • From: Steve Thompson <email@hidden>
  • Date: Wed, 10 Apr 2002 14:34:32 +0100

I have this script

set mrt to {long list of 10,000+ items created from a text file)
set k to {}
repeat with i from 1 to (the number of items in mrt)
if item i of mrt is not in k then set k to k & (item i of mrt)
end repeat

...the idea being that k contains a list of unique items based on whats in
mrt

Is there a quicker way to do this or an OSAX that will do it for me? I did
find one in Akua sweets:

set j to order list mrt with removal of duplicates

But it takes longer than the script above!

Any suggestion gratefully received,

Steve
_______________________________________________
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: Trimming down a list
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Scripting to put a "Drag Link"on the desktop
  • Next by Date: Re: Finder Version Wrong in OS X
  • Previous by thread: Entire contents and package crash
  • Next by thread: Re: Trimming down a list
  • Index(es):
    • Date
    • Thread