Re: current email in Eudora
Re: current email in Eudora
- Subject: Re: current email in Eudora
- From: Bill Briggs <email@hidden>
- Date: Fri, 3 Aug 2001 19:17:33 -0300
At 3:17 PM -0400 03/08/01, Rob Jorgensen wrote:
On 8/3/01, John, Mitchell commented:
I want to select a piece of text in the body of the email and then
edit that text to create an appt in NUTD. The latter part is fine -
I can parse the line and create the date etc. What I cannot do is
get the "From" field out of the email message (window 1) - ie from
the current window its easy to get the "selected text" but I cannot
work out a way to identify the "current" message of that window.
any suggestions
message 0 refers to the front or selected message. It appears that
if more than message is selected in a mailbox, Eudora will work on
the first message (very little testing done on this theory).
tell application "Eudora"
set fromField to field "From" of message 0
set fromField to items 7 thru -1 of fromField as string
end tell
You can/probably should obtain the (unique) message ID which is
assigned by Eudora and use it to refer to the message throughout the
rest of the script. Using the ID can help to avoid problems in the
event that a user selects a different message before the script is
finished.
tell application "Eudora"
set messID to id of message 0
set fromField to field "From" of message id messID
set fromField to items 7 thru -1 of fromField as string
end tell
It's even easier than that. You can directly address the front
window as the "front window". It doesn't matter how many you've got
selected in the mailbox, or how many are open.
tell application "Eudora"
set fromField to field "From" of front message
end tell
- web