Re: Delete person in AddressBook
Re: Delete person in AddressBook
- Subject: Re: Delete person in AddressBook
- From: Michelle Steiner <email@hidden>
- Date: Thu, 6 Nov 2008 18:30:50 -0700
On Nov 6, 2008, at 4:24 PM, Robert R. Horning wrote: In the error handler, I wish to tell Address Book to delete ThePerson so that I can start over, but have found no syntax that works. Any ideas?
This works for me:
tell application "Address Book" set testPerson to make new person with properties {first name:"test", last name:"test"} save addressbook tell testPerson try set its namenick to "foo" on error delete testPerson save addressbook end try end tell end tell
There is no property "namenick", so the try fails, and falls into the on error handler.
-- Michelle
-- Tubal Litigation: Suing because of a misconception
|
_______________________________________________
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