• 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: Properties within Properties - Scripting Address book
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Properties within Properties - Scripting Address book


  • Subject: Re: Properties within Properties - Scripting Address book
  • From: Michelle Steiner <email@hidden>
  • Date: Tue, 13 Sep 2005 22:58:19 -0700


On Sep 13, 2005, at 6:47 PM, chet kelley wrote:

 So I tried

 make new person with properties {organization: "drama", address:{city: "Miami", state:"Fl"}}

which applescript compiled without complaints, but didn't work (only the organization was entered into the new person record.

Address is an element, not a property, of a person, so you have to add it to an existing person (even if it exists only as a result of being created in the previous line).

tell application "Address Book"
    set newPerson to make new person at end of people with properties {first name:"Julius", last name:"Orange", organization:"Drama"}
    tell newPerson
        make new address at end of addresses with properties {city:"Miami", state:"Fl"}
    end tell
    save addressbook
end tell

-- Michelle

-- 
"Growth for thesake of growth is the ideology of the cancer cell."

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Properties within Properties - Scripting Address book (From: chet kelley <email@hidden>)

  • Prev by Date: Re: Properties within Properties - Scripting Address book
  • Next by Date: Re: Properties within Properties - Scripting Address book
  • Previous by thread: Re: Properties within Properties - Scripting Address book
  • Next by thread: Re: Properties within Properties - Scripting Address book
  • Index(es):
    • Date
    • Thread