• 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
Creating a list of numbers from a Contacts group
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creating a list of numbers from a Contacts group


  • Subject: Creating a list of numbers from a Contacts group
  • From: debt <email@hidden>
  • Date: Fri, 23 Dec 2016 15:53:36 -0800

I want to create a list of all phone numbers that are in a Contacts group.  However, I’m running into a problem.  The script fragment below doesn’t work unless there’s only a single phone number in each contact.  I’d like to script this so that if a contact has multiple phone numbers, each number will be added to the list.

Thanks,
Marc


tell application "Contacts"
set gName to "Solicitors"
set solicitor_list to {}
set people_count to (count every person of group gName)
repeat with i from 1 to people_count
set  number to (get value of phone of person i of group gName)
set solicitor_list to solicitor_list & number
end repeat
end tell
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Creating a list of numbers from a Contacts group
      • From: Andrew Oliver <email@hidden>
  • Prev by Date: Cropping pdf in ACROBAT
  • Next by Date: Re: Creating a list of numbers from a Contacts group
  • Previous by thread: Re: Cropping pdf in ACROBAT
  • Next by thread: Re: Creating a list of numbers from a Contacts group
  • Index(es):
    • Date
    • Thread