• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Address Book
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Address Book
      • From: John Delacour <email@hidden>
    • Re: Address Book
      • From: rich allen <email@hidden>
  • Prev by Date: Re: Script-dictionary
  • Next by Date: Re: a "repeat" before a "on idle"
  • Previous by thread: Re: Script-dictionary
  • Next by thread: Re: Address Book
  • Index(es):
    • Date
    • Thread