• 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: AppleScript and shell scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript and shell scripting


  • Subject: Re: AppleScript and shell scripting
  • From: Michelle Steiner <email@hidden>
  • Date: Sun, 29 Jul 2007 09:55:25 -0700

On Jul 29, 2007, at 9:37 AM, Doug McNutt wrote:

Because in Address Book 'email' is an element of 'person' , not a property. You are trying to set a string to this element, which won't work. The 'email' element has its own properties. Take a look at this script that I think might be relevant:

Anyone who really thinks that AppleScript is any less arcane than perl or tcsh should memorize that as a mantra.

How would you add an email address to a contact (AKA: person) in the Address Book using perl or tcsh?


Here is how to do it with Applescript:

tell application "Address Book"
tell item 1 of (get the selection) to make new email with properties {label:"home", value:"email@hidden"}
save addressbook
end tell


-- Michelle

--
Social Security Privatization: a solution in search of a problem.

_______________________________________________
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
  • Follow-Ups:
    • Re: AppleScript and shell scripting
      • From: Philip Aker <email@hidden>
    • Re: AppleScript and shell scripting
      • From: "Mark J. Reed" <email@hidden>
    • Re: AppleScript and shell scripting
      • From: Emmanuel <email@hidden>
References: 
 >Re: AppleScript and shell scripting (From: Ed Stockly <email@hidden>)
 >Re: AppleScript and shell scripting (From: Bill Briggs <email@hidden>)
 >Re: AppleScript and shell scripting (From: Doug McNutt <email@hidden>)

  • Prev by Date: Re: AppleScript and shell scripting
  • Next by Date: Re: Address book
  • Previous by thread: Re: AppleScript and shell scripting
  • Next by thread: Re: AppleScript and shell scripting
  • Index(es):
    • Date
    • Thread