Re: Address Book comparison
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