Re: Mail.app "reply" verb returning nothing
Re: Mail.app "reply" verb returning nothing
- Subject: Re: Mail.app "reply" verb returning nothing
- From: deivy petrescu <email@hidden>
- Date: Wed, 3 Jan 2007 09:31:31 -0500
On Jan 2, 2007, at 21:59, Michelle Steiner wrote:
The problem is that "reply" does not return a value, so you can't
assign a variable to the message.
Try running this script, with an incoming message selected:
tell application "Mail"
activate
set foo to item 1 of (get the selection)
set bar to reply foo with opening window
bar
end tell
- -- Michelle
On Jan 2, 2007, at 22:47, Dylan McNamee wrote:
deivy petrescu wrote:
Michelle,
I wrote to Dylan just a second ago, and I am writing to you now.
In both cases I replied using the script (ipsis literis) that was
sent by Dylan.
What seems to be the problem?
On Jan 2, 2007, at 15:55, Michelle Steiner wrote:
On Jan 2, 2007, at 1:49 PM, Dylan McNamee wrote:
Am I doing something wrong, or is this a bug in the reply verb?
If it's the latter, I'm happy to file a bug report (while
grumbling loudly because this kind of thing seems to happen
every time I try AppleScript).
It's a long-standing bug, and has been reported. But the more bug
reports for the same bug, the better chance there are of it
getting fixed. But don't count on it getting fixed in Tiger.
The script does fire up a reply message in Mail, but then can't do
anything with it (say fill in the content, or anything else) --
because the reply verb didn't hand the script back a handle to the
new outgoing message. So you have to manually fill in the content,
etc., which is what I'm hoping to automate.
dylan
(ps: I didn't get the reply you wrote to me...hmmm.)
That is not what is happening here.
I did not get an error on the first (original) script. Which I should
if reply would return nothing.
But I've made a slight change in the script and here i what I got:
<script>
tell application "Mail"
activate
set viewer to message viewer 1 -- it took Google to tell me I needed
the "1" here...
tell viewer
set msgs to selected messages
set msg to first item of msgs
end tell
set myReply to reply msg with opening window
if myReply is false then
set j to "empty reply?!"
else
set j to "ok"
end if
end tell
j
</script>
<result>
---> "ok"
</result>
<event log window>
tell application "Mail"
activate
get message viewer 1
message viewer id 107382976
get selected messages of message viewer id 107382976
{message id 213805 of mailbox "INBOX" of account "applescript"}
reply message id 213805 of mailbox "INBOX" of account "applescript"
with opening window
«class id 3 --> Note
end tell
</event log window>
NOTE: it is <<class>> where the "<" and ">" are actually chevrons.
For some reason Mail gets "<<" but not ">>".
I believe the bug has been squashed or was never there. Do you have
any OSAXen ?
Other than the usual ones I only have the ones included with Smile.
By the way Dylan, check your messages again, I did send it!
Deivy _______________________________________________
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/mailman//archives/applescript-users
This email sent to email@hidden