• 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: Eliminating duplicate items from a list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Eliminating duplicate items from a list


  • Subject: Re: Eliminating duplicate items from a list
  • From: KOENIG Yvan <email@hidden>
  • Date: Tue, 4 Sep 2007 14:29:08 +0200


Hello

One may fasten the Mark J. Reed code:

property origList : {}
property uniqueList : {}

-- (code to get origList here)

set my uniqueList to {}
repeat with i from 1 to length of my origList
	set foundIt to false
	repeat with j from 1 to length of uniqueList
		if item j of my uniqueList = item i of my origList then
			set foundIt to true
			exit repeat
		end if
	end repeat
	if foundIt is false then
		set end of my uniqueList to item i of my origList
	end if
end repeat

Yvan KOENIG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Eliminating duplicate items from a list
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Eliminating duplicate items from a list (From: Brett Conlon <email@hidden>)
 >Re: Eliminating duplicate items from a list (From: email@hidden)

  • Prev by Date: Re: Eliminating duplicate items from a list
  • Next by Date: Re: Eliminating duplicate items from a list
  • Previous by thread: Re: Eliminating duplicate items from a list
  • Next by thread: Re: Eliminating duplicate items from a list
  • Index(es):
    • Date
    • Thread