On Mon, Mar 31, 200810:18 PM, the following words from Irene
[EMAIL PROTECTED], emerged from a plethora of SPAM ...
>Tim Lapin wrote:
>
>> Quite frankly, I've never understood why someone would want to edit someone
>>else's original e-mail. Such an action destroys the integrity of e-mail.
>
>I receive a lot of digest emails which most of the time contain one
>piece of information that I want to keep for future reference or action.
>When using ClarisEmailer I was able to edit the subject line directly
>and then the content of the digest (using a script) to save only that
>part of the digest I wanted to keep.
>
>This gave me ONE email with a specific subject line, which when opened
>contained only the reference/link I was interested in. The "To", "From"
>and "Date" fields were maintained. No duplicates, no drafts ...
>
>I miss this capability in PM, but having said that, I do appreciate the
>many other features of PM which were not possible with CEmailer.
>
>Irene
>
It has recently been mentioned that the content of incoming messages can
be modified/edited using AppleScripts. Using AppleScript, you can edit
the subject line of topics as well.
Below are examples of AppleScripts that have the above behavior.
<Begin AppleScript>
-- Replaces the contents of an OPEN message with the text on
-- the clipboard.
property clipStuff : ""
to replaceMsgContent(targetMsg)
tell application "PowerMail"
close the front window
set content of the targetMsg to the clipStuff
open the targetMsg
end tell
end replaceMsgContent
set the clipStuff to the clipboard as text
tell application "PowerMail"
if exists the displayed message of the front window then
set the targetMsg to the displayed message of the front window
my replaceMsgContent(targetMsg)
else
say "Unable to comply. Open message required."
end if
end tell
set the clipStuff to ""
<End AppleScript>
* * * * * * * * * * * * * * *
<Begin AppleScript>
-- Removes message content, keeping only the selected text
-- Customize your "This message modfied" data before running!
-- See "preT" property below
property preT : "The modification date of this message by cheshirekat: "
property ret : return
property sp : " "
to getTextFromPM()
tell application "PowerMail"
return (the selection of the front window)
end tell
end getTextFromPM
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, sTxt)
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 sTxt)
open the tMsg
end tell
end alterPMMsg
tell application "PowerMail"
if (exists (the displayed message of the front window)) and ¬
(exists (the selection of the front window)) then
set the selectedTxt to my getTextFromPM()
set the targetMsg to my getTargetMsg()
set the msgContent to my getMsgContent(targetMsg)
my alterPMMsg(targetMsg, selectedTxt)
else
say "Unable to comply. Open message and selected text required."
end if
beep
end tell
<End AppleScript>
* * * * * * * * * * * * * * *
<Begin AppleScript>
-- Modifies the subject of messages marked by Pobox mail service
-- as potential spam
-- Note that there is a script to modify the subject in the default
-- AppleScripts folder provided with PowerMail
to getTheLastWords(passedText)
if the passedText contains "spam score" and the passedText contains
"pobox] " then
set the desiredLastWords to (characters 27 thru -1 of (the
passedText)) as text
return the desiredLastWords
else
return "Not Spam!"
end if
end getTheLastWords
tell application "PowerMail"
set the targetList to the current messages
set the msgCount to count the targetList
if the msgCount is greater than 0 then
repeat with targetMsg in the targetList
set the targetsSub to the subject of the targetMsg
set the lastWords to getTheLastWords(targetsSub) of me
if the lastWords is not "Not Spam!" then
try
set the subject of the targetMsg to the lastWords
on error
beep
end try
else
say the lastWords
end if
end repeat
else
say "No messages selected."
end if
end tell
<End AppleScript>
The above scripts are examples and can be modified to behave in ways
germane to your needs. I think CTM has additional scripts on their site.
I used to provide the scripts I made on my site, but there are several
PowerMail users that spend more time writing scripts than I do so I
removed mine to use the space for other stuff. You can always ask for
help on this mailing list and the scripters that have the time and wish
to help, will probably offer their assistance if you are not familiar
with creating or modifying scripts.
--
"Let us be grateful to people who make us happy; they are the charming
gardeners who make our souls blossom." -Marcel Proust
* Mac Pro 2 GHz Quad Xeon * OS X 10.4.11 * 5 GB RAM *