• 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 12:21:04 -0700

On Jul 29, 2007, at 11:51 AM, Mark J. Reed wrote:

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

And until you told me that, I would have had absolutely no idea. I believe
that's the whole point: the alleged transparency of AppleScript is a
fallacy brought on by familiarity.

I figured it out, fairly easily, from the Address Book's dictionary.

Email is an element, so you have to make one; if it were a property, I would have to set it instead of making it.

Of all the languages I've tried to learn, I was able to learn Applescript the easiest. Maybe that's because it was the last one I tried to learn.

-- Michelle

--
"Every gun that is made, every warship launched, every rocket fired, signifies in the final sense a theft from those who hunger and are not fed, those who are cold and are not clothed."
President Dwight D. Eisenhower, April 16, 1953


_______________________________________________
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: Peter Baxter <email@hidden>
References: 
 >Re: AppleScript and shell scripting (From: Ed Stockly <email@hidden>)
 >Re: AppleScript and shell scripting (From: Michelle Steiner <email@hidden>)
 >Re: AppleScript and shell scripting (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: AppleScript-Users Digest, Vol 4, Issue 355
  • Next by Date: Re: AppleScript and shell scripting
  • Previous by thread: Re: AppleScript and shell scripting
  • Next by thread: Re: AppleScript and shell scripting
  • Index(es):
    • Date
    • Thread