Re: getting multiple selected messages in Eudora?
Re: getting multiple selected messages in Eudora?
- Subject: Re: getting multiple selected messages in Eudora?
- From: KLW <email@hidden>
- Date: Wed, 16 Jul 2003 01:44:04 -0400
(Thank you to Mr. Delacour for his essential help in getting me
further on the road.)
I now have the script running through using references, rather than
ids. However, there are two ways the user can report spam.
1: By selecting a file or several files in a mailbox. When the user
does that, file references are inserted into the _messages list. So
far, so good.
2. However, I also want the user to be able to process a message that
has been opened. But of course, when I pass:
[applescript]
set end of _messages message ""
[/applescript] while message "" refers to the open window, I don't
get a file reference, I get the message itself.
This means that I can't treat the _messages list the same in both
instances. Obviously, I could create two separate subroutines for
each case (one for when _message contains actual messages, and one
for where it contains file references), but that's pretty messy. The
best answer would be if I could find a way to make a file reference
out of an open window. I tried hand-making one like this:
[applescript]
set end of _messages to "message id " & thisMessageId & " of mailbox
\"" & thisMessageMailboxName & "\" of application \"Eudora\""
[/applescript]
I got this:
{"message id 1.37495161E+9 of mailbox \"In\" of application \"Eudora\""}
when I wanted this:
{message id 1.37495161E+9 of mailbox "In" of application "Eudora"}
Basically, I was trying to emulate the string represenation of the
file references. It wasn't until a few hours later that it dawned on
me that even if I had been able to make a perfect facsimile of the
string representation, I doubt if the string representation of the
file reference would have been usable in the same way as the file
reference itself.
Any hints?
Sincerely,
//Kristofer Widholm
...
tell app "Eudora"
set ls to {}
set _senders to {}
set w to the name of the front window
try
file of mailbox w
on error
tell me to display dialog "
A mailbox summary must be frontmost" with icon 0
return
end
repeat
try
set end of ls to move message "" to end of mailbox w
on error
exit
end
end
repeat with m in ls
set end of _senders to sender of m
end
_senders
end
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.