Re: Creating a list of numbers from a Contacts group
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