Re: AppleScript and shell scripting
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