Re: Address Book
Re: Address Book
- Subject: Re: Address Book
- From: Paul Berkowitz <email@hidden>
- Date: Sun, 01 Sep 2002 00:23:13 -0700
On 9/1/02 12:01 AM, "rich allen" <email@hidden> wrote:
>
iH
>
>
using Address Book in 10.2 i have been able to create a new person,
>
however can't figure out the syntax for adding an email address or
>
other element to that person. Would appreciate a syntax example
>
Set a variable to the person you make. Then you need the apparently Cocoa
form of 'at beginning [or end] of emails' [or other elements like phones],
as if the object maintains a list of these elements (even an empty list)
just for the purpose of having new ones added on.
set thePerson to make new person with properties {first name:"Joe", last
name:"Blow"}
make new email at end of emails of thePerson with properties
{label:"home", value"email@hidden"}
But it's reads better to nest it. And in either case, don't forget to 'save
addressbook' at the end of whatever you're doing.
set thePerson to make new person with properties {first name:"Joe", last
name:"Blow"}
tell thePerson
make new email at end of emails with properties {label:"home",
value"email@hidden"}
end tell
save addressbook
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.