• 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: Address Book comparison
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Address Book comparison


  • Subject: Re: Address Book comparison
  • From: has <email@hidden>
  • Date: Mon, 4 Jul 2005 22:16:30 +0100

Patrick Collins wrote:

>I am wondering how to tell Address Book to examine all of it's cards and
>check to see if an email address exists.

To get a list of references to all people with at least one email address:

    tell app "Address Book" to get every person whose emails is not {}


To get a list of references to all people with a specific email address:

    set emailAddress to "email@hidden"
    tell app "Address Book" to get every person where value of every email contains emailAddress


To check if a specific email address exists:

    set emailAddress to "email@hidden"
    tell app "Address Book" to (count every person where value of every email contains emailAddress) > 0


HTH

has
--
http://freespace.virgin.net/hamish.sanderson/
 _______________________________________________
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

  • Prev by Date: Re: Address Book comparison
  • Next by Date: Re: Capturing parts of text string
  • Previous by thread: Re: Address Book comparison
  • Next by thread: Re: Address Book comparison
  • Index(es):
    • Date
    • Thread