Hello Subhash,

I am also very interested in this script to trim the message content.

Is it possible that "Postzentrale" or "Post Office" might be the name of
the top mail folder; "In Tray"? Or maybe "Mail Browser"?

What is this Script trying to do at that point?
Is it checking to see if we are looking at the list of emails, or an open
email?
In the US English version when I look at the list of emails: the window
title is "Mail Browser: Name of folder".

If we are looking at an open email message, the window title is only the
message subject.

Best,
 Dave Nathanson
 Mac Medix


in reply to ([EMAIL PROTECTED]), computer artwork by subhash's message of
12:10 AM, 9/23/04

>
>You cannot edit an incoming message manually, only per AppleScript. There
>is a Script tu shrink the content to the selected content. Maxbe that is
>what you want. Unfortunately I do not remeber the name (I renamed it to
>German). Here it is (ah I see it also is written originally by the famous
>cheshirekat). You have to change the German terminus "Postzentrale" to
>the appropriate english word ("poststation"???).
>
><start AppleScript>
>
>-- created by [EMAIL PROTECTED]
>-- angepasst von Subhash ([EMAIL PROTECTED])
>
>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"
>               --              set the targetMsg to the displayed message of 
> the front window
>               return (the content of the targetMsg)
>       end tell
>end getMsgContent
>
>to alterPMMsg(targetMsg, selectedTxt)
>       tell application "PowerMail"
>               if name of the front window does not contain "Postzentrale" then
>                       close the front window
>               end if
>               set content of the targetMsg to the selectedTxt
>               if name of the front window does not contain "Postzentrale" then
>                       open the targetMsg
>               end if
>       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
>end tell
>
><end AppleScript>
>
>--
>http://www.subhash.at
>
>
>




Reply via email to