on Mon, 31 Mar 2008 17:40:07 -0700 cheshirekat very kindly wrote:

>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>
>
<clip>

Thank you so much for posting the applescripts ! I had no experience of
using ScriptEditor, so looked at its Help section and found basic
instructions for compiling and saving a script. I had no hope of
succeeding first time but when I tried the script you sent (quoted
above) it worked !

This script does exactly what I wanted. Along with the
"changesubjectscript" I can now get back to my old habits of editing
incoming digests. This will save me lots of time.

Many thanks again
Irene


Reply via email to