• 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 21:37:40 -0600

On Jan 06, 2017, at 09:53, Yvan KOENIG <email@hidden> wrote:
Am'I just facing a special case or is (theArray's valueForKeyPath:"@unionOfArrays.self") as list really designed to drop the empty lists ?


Hey Folks,

Apparently there's not a built-in method to collapse more than one tier of lists using @unionOfArrays.self, but Shane's BridgePlus library has such a method:

-------------------------------------------------------------------------------------------
# Requires that Shane Stanley's BridgePlus Library be Installed!
-------------------------------------------------------------------------------------------
use AppleScript version "2.4"
use framework "Foundation"
use scripting additions
use script "BridgePlus"
load framework

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

set phoneNumList to current application's SMSForder's arrayByFullyFlattening:phoneNumList
set phoneNumList to ASify from phoneNumList

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

This works quite nicely.

Download BridgePlus:

https://www.macosxautomation.com/applescript/apps/BridgePlus.html

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

References: 
 >Re: Creating a list of numbers from a Contacts group (From: Nigel Garvey <email@hidden>)
 >Re: Creating a list of numbers from a Contacts group (From: Nigel Garvey <email@hidden>)
 >Re: Creating a list of numbers from a Contacts group (From: Shane Stanley <email@hidden>)
 >Re: Creating a list of numbers from a Contacts group (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Re: Creating a list of numbers from a Contacts group
  • Next by Date: Can Acrobat PDF's be saved as single pages via Applescript
  • 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