Title: Re: Clean Forward Script
on 12/15/00 1:05 PM, Dan Crevier at [EMAIL PROTECTED] wrote:

The main change will be that you’ll reference the subject of the front window and the content of the front window instead of using “of the displayed message” in there.


       -- ���clean subject
       set theSubject to the subject of the displayed message of the front window
        set theSubject to my SearchReplace(theSubject, " (fwd)", "")
        set theSubject to my SearchReplace(theSubject, "Fw: ", "")
        set theSubject to my SearchReplace(theSubject, "FW: ", "")
        set theSubject to my SearchReplace(theSubject, "Re: ", "")
        set theSubject to my SearchReplace(theSubject, "Fwd[2]:", "")
        set theSubject to my SearchReplace(theSubject, "Fwd:", "")
        
        set the subject of the displayed message of the front window to theSubject
        
        --
���clean text
       set theText to the content of the displayed message of the front window
        
        --
strip up to return return to get rid of header
       set headerEnd to offset of (return & return) in theText
        set theText to text (headerEnd + 2) thru -1 of theText
        
        --
strip end of forward message
       set theText to my SearchReplace(theText, ¬
            "----------------- End Forwarded Message -----------------", "")

        
--while we’re at it, maybe we could add something like this:
       set theText to my SearchReplace(theText, ¬
        “
Get more from the Web.  FREE MSN Explorer download : htp://explorer.msn.com”,””)

So, would that become the following?

       -- ���clean subject
       set theSubject to the subject of the front window
        set theSubject to my SearchReplace(theSubject, " (fwd)", "")
        set theSubject to my SearchReplace(theSubject, "Fw: ", "")
        set theSubject to my SearchReplace(theSubject, "FW: ", "")
        set theSubject to my SearchReplace(theSubject, "Re: ", "")
        set theSubject to my SearchReplace(theSubject, "Fwd[2]:", "")
        set theSubject to my SearchReplace(theSubject, "Fwd:", "")
        
        set the subject of the front window to theSubject
        
        --
���clean text
       set theText to the content of the front window
        
        --
strip up to return return to get rid of header
       set headerEnd to offset of (return & return) in theText
        set theText to text (headerEnd + 2) thru -1 of theText
        
        --
strip end of forward message
       set theText to my SearchReplace(theText, ¬
            "----------------- End Forwarded Message -----------------", "")

        
--while we’re at it, maybe we could add something like this:
       set theText to my SearchReplace(theText, ¬
        “
Get more from the Web.  FREE MSN Explorer download : htp://explorer.msn.com”,””)

Thanks.

Reply via email to