Re: perhaps I'll ask again on the Mail scripting thing
Re: perhaps I'll ask again on the Mail scripting thing
- Subject: Re: perhaps I'll ask again on the Mail scripting thing
- From: Michelle Steiner <email@hidden>
- Date: Sun, 27 Jul 2008 15:26:38 -0700
On Jul 27, 2008, at 2:54 PM, Charles Arthur, UKClimbing Editor wrote: I want to script a reply in Mail. I want to be able to set the content. Mail has a command "reply" which replies to a selected message. But I can't figure out how to set the content in the reply to what I want.
Part of the, or maybe the entire, problem is that Pre-Leopard's Mail's reply command does not return a reference to the message it generates. I was surprised that it returned the reference when I tried it today. Leopard 10.5.4; I don't know about earlier versions of Leopard, though.
The following will insert whatever text you wish before the quoted content of the reply message. One would think that it would replace the entire content, but it doesn't. I'm going to write up a bug about that.
tell application "Mail" set the messageToReplyTo to item 1 of (get the selection) set the ReplyMessage to reply messageToReplyTo with opening window set content of ReplyMessage to "This is the inserted text." end tell
-- Michelle
-- Please contribute to the Leukemia and Lymphoma Society, and help me meet my fund raising goal for my marathon training.
|
_______________________________________________
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