On Wed, Sep 22, 200414:59, the following words from Dr Dave drdave-
[EMAIL PROTECTED], emerged from a plethora of SPAM ...
>I used to have a script that enabled editing incoming messages. I just
>downloaded it again from the CTM site, but it doesn't quite work now.
>It's named Edit Incoming Messages by Kuribo. I don't know what version of
>PM it was written for, but apparently not 5.
>
>What it does do is write the time & date at the top of the message.
Here is an example of what you want to do. If you open a message, the
content of the message will be _changed_ to (1) a modification message
(2) the current date and time (3) the content of the displayed message. I
did not create this AppleScript to work on a bunch of selected messages
at once so there is no need to worry about accidently modifying messages
that you don't want altered. ** Note: Once you modify the content of a
message, it can NOT be undone. Use the "Duplicate message" AppleScript
if you want to test the script without damaging an important message. Or
try the script out on a message you don't care about. You have been warned.
<Begin AppleScript>
property preT : "The modification date of this message by cheshirekat: "
property ret : return
property sp : " "
to getTargetMsg()
tell application "PowerMail"
return (the displayed message of the front window)
end tell
end getTargetMsg
to getMsgContent(targetMsg)
tell application "PowerMail"
return (the content of the targetMsg)
end tell
end getMsgContent
to alterPMMsg(tMsg, msgC)
tell application "PowerMail"
close the front window
set the cDate to (the current date) as string
set the preT to (the preT & ret & sp & the cDate & ret & ret)
set the content of the tMsg to (the preT & the msgC)
open the tMsg
end tell
end alterPMMsg
tell application "PowerMail"
if (exists (the displayed message of the front window)) then
set the targetMsg to my getTargetMsg()
set the msgContent to my getMsgContent(targetMsg)
my alterPMMsg(targetMsg, msgContent)
else
say "Unable to comply. Open message required."
end if
beep
end tell
<End AppleScript>
cheshirekat
--
Music is your own experience, your own thoughts, your wisdom. If you
don't live it, it won't come out of your horn. They teach you there's a
boundary line to music. But, man, there's no boundary line to art.
- Charlie Parker (1920-1955), U.S. jazz musician. quoted in Children of
Albion: Poetry of the Underground in Britain, "Afterwords," sct. 3, ed.
Michael Horovitz (1969).
* 867 PowerBook G4 * OS X 10.2.8 * 768 MB Ram *
* Addictions: iTunes * AppleScript * Mike's Cards * FileMaker Pro *