• 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: Removing duplicates in a list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Removing duplicates in a list (From: Bernard Azancot <email@hidden>)

  • Prev by Date: Re: convert hex colour to RGB values
  • Next by Date: Re: Filemaker
  • Previous by thread: Removing duplicates in a list
  • Next by thread: Re: Removing duplicates in a list
  • Index(es):
    • Date
    • Thread