• 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
Definitions and Class error Re: Search Contacts for phone number
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Definitions and Class error Re: Search Contacts for phone number


  • Subject: Definitions and Class error Re: Search Contacts for phone number
  • From: DevMail <email@hidden>
  • Date: Sun, 28 Sep 2014 14:08:29 +0200

Gent's

Because I have to do something in 10.10 public beta3, I was playing with some of the code in this thread.
However I found that  scripts doesn't work.
So my very simple question, is this a 10.10b3 problem or....?
I'am no expert, but I do, most of the time, find my way out. But at this I am lost. In the Yo Contacts AS Library, phone and people are there.

I do get all the time....



tell application "Contacts"
name of first person whose (class of (first phone whose value contains "(805) 555-5555") is phone)
end tell



set AppleScript's text item delimiters to linefeed
tell application "Contacts"
  set foundList to (value of phone of people) as text
end tell
do shell script "<<< " & quoted form of foundList & " sed -E '/^$/d' | sort -n"
-------------------------------------------------------------------------------------------

both above - variable "person" is not defined error No -2753




tell application "Contacts"
set foundList to people whose (class of (first phone whose value contains "(405) 880-4551") is phone)
end tell



-------------------------------------------------------------------------------------------
set incomingPhoneNumber to "805-555-5555"
set AppleScript's text item delimiters to "-"
set {areaCode, preFix, suFix} to text items of incomingPhoneNumber
tell application "Contacts"
  set foundList to people whose (class of (first phone whose value contains areaCode and value contains preFix and value ends with suFix) is phone)
end tell
-------------------------------------------------------------------------------------------


both above doesn't compile
Expected Classname, found identifier ( phone is highlighted )

Any suggestions? 


 _______________________________________________
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

  • Follow-Ups:
    • Re: Definitions and Class error Re: Search Contacts for phone number
      • From: Shane Stanley <email@hidden>
References: 
 >Search Contacts for phone number (From: Bill Vlahos <email@hidden>)
 >Re: Search Contacts for phone number (From: Axel Luttgens <email@hidden>)
 >Re: Search Contacts for phone number (From: Christopher Stone <email@hidden>)
 >Re: Search Contacts for phone number (From: Bill Vlahos <email@hidden>)
 >Re: Search Contacts for phone number (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: Add event to Calendar
  • Next by Date: Re: Definitions and Class error Re: Search Contacts for phone number
  • Previous by thread: Re: Search Contacts for phone number
  • Next by thread: Re: Definitions and Class error Re: Search Contacts for phone number
  • Index(es):
    • Date
    • Thread