• 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
Unique items in list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unique items in list


  • Subject: Unique items in list
  • From: Eric Geoffroy <email@hidden>
  • Date: Thu, 21 Oct 2004 10:22:12 -0700

Golly I should be able to handle this simple task but I'm failing.

I have a long list that has a lot of dupes. I needs to be narrowed to unique items. I've tried to ways to attack this.

Method A: Works, but I end up with a column of results that I can't coerce back into a list.

repeat with x in finals
set end of finals to x & ", "
end repeat
set finals to (do shell script "echo " & (quoted form of (finals as string) & " | " & "sort -u"))





Method B: Doesn't work at all.

set finals to {1, 5, 5, 5, 6, 66, 999}
set juz to {}

repeat with x in finals
	if x is not in juz then set end of juz to x
end repeat
contents of juz

_______________________________________________
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


  • Follow-Ups:
    • Re: Unique items in list
      • From: John Stewart <email@hidden>
    • Re: Unique items in list
      • From: Emmanuel <email@hidden>
    • Re: Unique items in list
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Mount Volume with UAM?
  • Next by Date: Re: Appleworks.
  • Previous by thread: Mount Volume with UAM?
  • Next by thread: Re: Unique items in list
  • Index(es):
    • Date
    • Thread