• 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 Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Address Book Question & Another address book question
      • From: Lachlan Deck <email@hidden>
References: 
 >Address Book Question (From: Oakley Masten <email@hidden>)

  • Prev by Date: Re: Simple? Tell FMP to open a database?
  • Next by Date: Re: Launching TextEdit with a TEXT document
  • Previous by thread: Re: Address Book Question
  • Next by thread: Re: Address Book Question & Another address book question
  • Index(es):
    • Date
    • Thread