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

Re: Creating a list of numbers from a Contacts group


  • Subject: Re: Creating a list of numbers from a Contacts group
  • From: Christopher Stone <email@hidden>
  • Date: Fri, 06 Jan 2017 20:33:05 -0600

On Jan 05, 2017, at 10:31, David Crowe <email@hidden> wrote:
This does the trick purely in AppleScript using the Satimage OSAX:


If I was going to use the Satimage.osax ( which I often do :), I'd do it this way for sheer simplicity:

-------------------------------------------------------------------------------------------

tell application "Contacts" to tell every group to ¬
   set phoneNumList to value of every phone of every person

try
   phoneNumList / 0
on error errorMessage
   set phoneNumList to change "\"" into linefeed in errorMessage
   set phoneNumList to find text "^.*\\d.+" in phoneNumList with regexp, all occurrences and string result
   # join is a command from the Satimage.osax (comment-out to retain the list object):
   set phoneNumListStr to join phoneNumList using linefeed
end try

-------------------------------------------------------------------------------------------

--
Best Regards,
Chris

 _______________________________________________
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

  • Prev by Date: Re: Creating a list of numbers from a Contacts group
  • Next by Date: Re: Creating a list of numbers from a Contacts group
  • Previous by thread: Re: Creating a list of numbers from a Contacts group
  • Next by thread: Re: AppleScript-Users Digest, Vol 13, Issue 525
  • Index(es):
    • Date
    • Thread