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:23:24 -0600
On Jan 05, 2017, at 12:53, Deivy Petrescu <email@hidden> wrote:
May be I am missing something, but…:
… Why complicate simps things?
Good point.
I started to do that yesterday, but when I was testing it appeared that TIDs were eating some of my entries. So I elected to use the error-hander route.
BUT – revisiting this after reading your post I discovered that what really happened when I tested on every group instead of just Family was that whitespace was introduced in Script Debugger's result-viewer such that it only looked like entries were missing.
I was very surprised, because I've used TIDs to collapse nested lists to text for years.
This works nicely:
------------------------------------------------------------------------------------------- tell application "Contacts" to tell every group to ¬ set phoneNumList to value of every phone of every person
set AppleScript's text item delimiters to linefeed set phoneNumList to phoneNumList as text set phoneNumList to do shell script "sed -E '/^$/'d <<< " & quoted form of phoneNumList -------------------------------------------------------------------------------------------
|
_______________________________________________
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