Re: Address Book Question
Re: Address Book Question
- Subject: Re: Address Book Question
- From: Lachlan Deck <email@hidden>
- Date: Wed, 18 Feb 2004 11:09:20 +1100
Hi there,
On Wednesday, February 18, 2004, at 05:53 AM, Oakley Masten wrote:
Using the following script I can get Groups and Names but can not find
a way to get associated email addresses of the names.
tell application "Address Book"
--Routine gets list of groups
set NomeOGroups to name of every group as list
set theResult to choose from list NomeOGroups with prompt "Which
Group Do You Want?" without multiple selections allowed
--Routine gets list of names for choice
set ListONames to the name of every person
set theResult to choose from list ListONames with prompt "Which
Person Do You Want?" without multiple selections allowed
--display dialog "You have chosen - " & theResult
--Routine gets list of addresses
set emailList to {}
repeat with aValue in (value of every email of every person) as list
set aValue to aValue as string
-- only add if has a valid address
if (aValue is not null and aValue contains "@") then
set the end of emailList to aValue
end if
end repeat
set theRecipients to (choose from list emailList with multiple
selections allowed) as list
end tell
with regards,
--
Lachlan Deck
email@hidden
_______________________________________________
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.