Re: Removing duplicates in a list
Re: Removing duplicates in a list
- Subject: Re: Removing duplicates in a list
- From: Allen Watson <email@hidden>
- Date: Mon, 19 Jul 2004 09:22:48 -0700
On or near 7/19/04 5:07 AM, Bernard Azancot at email@hidden observed:
>
I am looking for a vanilla script that could remove text duplicates
>
(one or more words entries) in a list (in Tex Edit +, for example) ?
on removeDuplicates(aList)
set newList to {}
repeat with i from 1 to (length of aList)
set anItem to item 1 of aList
set aList to rest of aList
if {anItem} is not in aList then set end of newList to anItem
end repeat
return newList
end removeDuplicates
--
<email@hidden>
Scripts for OE and Entourage: <
http://allenwatson.thinkaccess.net/Scripts/>
Entourage questions: <
http://www.entourage.mvps.org/>
_______________________________________________
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.