Re: Removing dupes
Re: Removing dupes
- Subject: Re: Removing dupes
- From: kai <email@hidden>
- Date: Mon, 20 Sep 2004 01:58:22 +0100
On Sat, 18 Sep 2004 17:31:17 +0200, Bernard Azancot
<email@hidden> wrote:
I a looking of a classical simple routine to find +/- remove dupes in
a text list.
OK, I'll throw in this vanilla one, too (possibly handy if quite a few
dupes are anticipated):
set l to {"doughnuts", "eggs", "cheese", "doughnuts", "milk", "butter",
"doughnuts", "baked beans", "milk", "tomato ketchup", "bread",
"doughnuts", "butter", "baked beans", "eggs", "doughnuts"}
set text item delimiters to return
set l to return & l & return
set r to {}
repeat while (count l's paragraphs) > 2
set i to l's paragraph 2
set text item delimiters to return & i & return
set l to l's text items
set text item delimiters to return
set l to l as string
set r's end to i
end repeat
set text item delimiters to {""}
r
--> {"doughnuts", "eggs", "cheese", "milk", "butter", "baked beans",
"tomato ketchup", "bread"}
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden