Re: AppleScript and shell scripting
Re: AppleScript and shell scripting
- Subject: Re: AppleScript and shell scripting
- From: Peter Baxter <email@hidden>
- Date: Mon, 30 Jul 2007 08:14:46 +1000
Not that this has anything to do with this thread, but I was trying
to replace the original email, not make anew one. I already knew how
to make a new email.
I find this site a fantastic resource for spotting mistakes I have
made as well as learning new techniques, I particularly enjoy
different solutions using perl or whatever.
The alternative suggestions encourage me to search out new web sites
and learn about other languages as well as AS. Don't change a thing.
On 30/07/2007, at 5:21 AM, Michelle Steiner wrote:
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 (applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
Peter Baxter
email@hidden
"My masterpiece? Come on, it's Bolero! Unfortunately, it's empty of
music." -Ravel
_______________________________________________
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