Definitions and Class error Re: Search Contacts for phone number
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