Re: Trimming down a list
Re: Trimming down a list
- Subject: Re: Trimming down a list
- From: has <email@hidden>
- Date: Wed, 10 Apr 2002 17:51:42 +0100
Steve Thompson wrote:
>
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
Changing line 4 to:
if item i of mrt is not in k then set end of k to (item i of mrt)
should be a bit more efficient.
HTH
has
--
http://www.barple.connectfree.co.uk/ -- The Little Page of Beta 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.