• 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: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?


Hey Deivy,

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
-------------------------------------------------------------------------------------------

--
Take Care,
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

References: 
 >Re: Creating a list of numbers from a Contacts group (From: Christopher Stone <email@hidden>)
 >Re: Creating a list of numbers from a Contacts group (From: debt <email@hidden>)
 >Re: Creating a list of numbers from a Contacts group (From: Yvan KOENIG <email@hidden>)
 >Re: Creating a list of numbers from a Contacts group (From: Deivy Petrescu <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: Creating a list of numbers from a Contacts group
  • Index(es):
    • Date
    • Thread