Emailer script to file replies with replied-to messages
Emailer script to file replies with replied-to messages
- Subject: Emailer script to file replies with replied-to messages
- From: Michelle Steiner <email@hidden>
- Date: Sun, 11 Mar 2001 06:20:20 -0800
Here's a complete redo of a script I wrote a number of years ago to file
a reply to a message in the same folder as the received message that was
replied to. (This was the script that got corrupted that I was unable to
read, BTW). I could have written it so the dialog would say whether
there had never been a reply or the reply had been deleted, but that's
more information than is really necessary, I think.
Any suggestions for improvmements of technique, algorithms, etc. are
welcome.
--Michelle
set AnyMessagesMoved to false
tell application "Claris Emailer"
tell the front window
if its class is incoming message window then
set AnyMessagesMoved to my MoveAMessage(its displayed message,
AnyMessagesMoved)
if not AnyMessagesMoved then
my InfoDialog("The displayed message does not have existing replies.")
end if
else if its class is browser window then
set the messagelist to the selection
if the messagelist is {} then
my InfoDialog("You have to have at least one message selected.")
else
repeat with testMessage in the messagelist
if class of the testMessage is incoming message then
set AnyMessagesMoved to my MoveAMessage(testMessage,
AnyMessagesMoved)
end if
end repeat
if not AnyMessagesMoved then
my InfoDialog("None of the selected messages have existing replies.")
end if
end if
else
my InfoDialog("The front window has to be either an incoming message
window or a browser window.")
return
end if
end tell
end tell
on InfoDialog(message)
display dialog message buttons {"OK"} default button 1 with icon note
end InfoDialog
to MoveAMessage(testMessage, HasReplyFlag)
tell application "Claris Emailer"
set the ReplyMessageID to the reply id of the testMessage
if (outgoing message id ReplyMessageID) exists then
move outgoing message id ReplyMessageID to the storage of the
testMessage
set HasReplyFlag to true
end if
end tell
return HasReplyFlag
end MoveAMessage
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------