• 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: Yvan KOENIG <email@hidden>
  • Date: Fri, 06 Jan 2017 12:23:56 +0100


Le 6 janv. 2017 à 11:43, Nigel Garvey <email@hidden> a écrit :

In my message of Thu, 5 Jan 2017 22:13:04 +0000, I wrote:

-- Lose any empty arrays and coerce to list.
set phoneNumbers to (phoneNumbers's arrayByRemovingObject:({})) as
list

Many apologies. There's no such method as arrayByRemovingObject:  It
rightly causes an error in Script Editor. And yet it works as I'd
expected in Script Debugger, which is a cause for concern.  :\

I suppose the removal of empty arrays would have to be something like
this:

 -- Lose any empty arrays and coerce to list.
 set nonEmptyArrayPredicate to current application's class "NSPredicate"'s predicateWithFormat:("self != {}")
 set phoneNumbers to (phoneNumbers's filteredArrayUsingPredicate:(nonEmptyArrayPredicate)) as list

But Yvan's just informed me off-list that both of the scripts I posted
last night are errorring when they try to get the group's contacts. From
the error message he getting, it looks as if the group's not being
identified on his machine. I'm looking into that at the moment.

NG


I must apologize.
One of the problems which I faced was just due to the fact that I missed that in Nigel's codes, groupName  is case sensitive which is not the case in scripts posted before.

Yvan KOENIG running Sierra 10.12.2 in French (VALLAURIS, France) vendredi 6 janvier 2017 12:23:23


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

  • 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