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: Sun, 7 Jan 2007 13:44:03 -0500
On Jan 3, 2007, at 20:26, deivy petrescu wrote:
On Jan 3, 2007, at 14:58, Dylan McNamee wrote:
Martin Orpen wrote:
On 3 Jan 2007, at 19:19, Michelle Steiner wrote:
It really is a bug.
I reckon that it's more likely a verb that's going to be dropped
in Mail 3.0.
I filed a bug, it's numbered 4904656.
I sure hope this verb isn't dropped in the next Mail. As I
pointed out in my original posting, parsing a from address and
consing up a valid to address is nontrivial. This is because (in
Mail.app's wisdom) the sender is a flat string (including the Name
and the <email address>, with _many_ valid forms), but the
recipient is a structure with the name and address in separate
fields.
Mail.app knows all the rules for turning one into another. As
someone who wrote / hacked perl code to do this job long ago, I
really don't want to reproduce that magic in AppleScript. The
"reply" verb leverages Mail.app's logic for doing this, but is
useless for scripts as is.
Another way to fix the issue is to have recipient objects in
outgoing messages be flat strings, and let Mail.app parse them, or
to have senders be pre-parsed objects, like recipients are.
Again, thanks for all the thoughtful comments. (And I'm still
puzzled why it _works_ for deivy!)
cheers,
dylan
Well, I am puzzled too!
I just try that in 2 other Macs and it errors as you say yours does.
But I can still get the same result on (this) my computer.
I know it is not Mail's version because at least one is the same
version (mine is .2, .3 is Intel Mac).
Running the script in Smile I get a better answer:
myReply = «class » id x of application "Mail" where x is a
number that has been increasing by one with each run (last is 22).
I thought about the above and closed and launched Mail again, and
now I get an error here as well!!!
I want my old Mail back... :)
As far as I remember, there was no major restart recently. So I do
not know what happened. Anyway, I get a
chevron class space box box box box chevron in Smile. In both
cases, Smile and SE, it can not be pasted correctly in Mail.
Correcting, I used to get ...
Go figure!
Deivy
more intriguing stuff... it is running the script without errors again.
I can not understand what can trigger the event that Mail receives as
I run the script.
Is the event described by "myReply" an actual Mail event that I can
capture for whatever reason or something wrong in my computer can
trigger this particular event?
I am pasting the result I get from running the script in Smile. It is
a picture, but I want to have a record of it if anything goes
"wrong" (right?) later...
The script:
<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
myReply
</script>
The answer in Smile:
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