[Dr Dave <[EMAIL PROTECTED]> schrieb am 22.9.2004 um 22:45 Uhr:]

>Hello CheshireKat,
>Thanks for your reply. That's pretty neat, and it does successfully
>(permanently) insert the date & "cheshirekat". But when I try to type on ...

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