Re: Updating records in Address Book
Re: Updating records in Address Book
- Subject: Re: Updating records in Address Book
- From: Neil Faiman <email@hidden>
- Date: Tue, 19 Feb 2008 07:17:57 -0500
On Feb 18, 2008, at 10:25 PM, Robert R.Horning wrote:
The following fails when I try to update an pre-existing person,
returning the message "Can't set «class azf7» of
\"F0E1BBE2-1F41-41F1-8AF9-4689222BE552:ABPerson\" to \"Bob\"."
tell application "Address Book" to set theCardID to id of person
2 -- different from item 2 of ABids, since there are pre-existing
persons
tell application "Address Book" to set first name of theCardID to
"Bob"
tell application "Address Book" to save addressbook
theCardId is not a person, it's an ID. Presumably (I haven't tried
it), the syntax that you need is
set first name of person id theCardId to "Bob"
But as Michelle already noted, if you know the person index, you can
just use that directly. The only reason you would need to use the ID
is that it is an immutable handle that will still be valid if you have
done some intervening operation that might cause the person's index to
have changed.
Regards,
Neil Faiman
_______________________________________________
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