Search Contacts for phone number
Search Contacts for phone number
- Subject: Search Contacts for phone number
- From: Bill Vlahos <email@hidden>
- Date: Sun, 21 Sep 2014 14:33:11 -0700
How do I AppleScript a search of the Contacts application if I know the phone number? The application is a CallerID lookup so I just need to return the first name in the Mac Contacts application that has the phone number I’m searching for.
This script works to find every contact by name. tell application "Contacts" get name of first person whose name contains "Bill" end tell
This script does NOT work to find every contact by phone number and results in the error below. What am I doing wrong? tell application "Contacts" get name of first person whose phone contains "805" end tell
error "Contacts got an error: Can’t make phone into type specifier." number -1700 from phone to specifier
Thanks in advance, |
_______________________________________________
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