Re: Setting properties in Address Book
Re: Setting properties in Address Book
- Subject: Re: Setting properties in Address Book
- From: Christopher Nebel <email@hidden>
- Date: Sun, 10 Feb 2008 21:25:16 -0800
On Feb 10, 2008, at 4:20 PM, Robert R. Horning wrote:
Thanks for the suggestion. There is still a problem, as shown below.
On Feb 10, 2008, at 12:03 AM, Michelle Steiner wrote:
On Feb 9, 2008, at 10:26 PM, Robert R. Horning wrote:
In Tiger, having retrieved the person's id, is it possible to set
properties, such as Title, Nickname, and Suffix, for a person in
the Address Book after the entry for that person has been
entered? If so, what's the syntax?
tell application "Address Book"
set foo to person "Michelle steiner"
Unless I include the entire name exactly as it already exists in the
Address Book, including any title, middle name, etc., the Script
Editor returns:
"Address Book got an error: NSReceiverEvaluationScriptError: 4"
Assuming that you've obtained the Address Book id for a person (which
I'd think would require you to find them by name somehow, but I'll
assume you've solved that), then the syntax would be only slightly
different from what Michelle gave you:
tell application "Address Book"
set foo to person id michellesid
tell foo
set its title to "Queen"
-- etc.
end
end
In fact, you can see Address Book using this form itself. If you
simply get a person -- not a property of that person -- Address Book
will return a specifier giving that record by id:
get person "Chris Nebel"
--> person id "79DDA590-2412-4017-8B07-80FD912132FC:ABPerson"
Hopefully I answered the question you were trying to ask. If not,
you'll have to clarify it.
--Chris Nebel
AppleScript Engineering
_______________________________________________
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