Title: Re: Clean Forward Script
on 12/15/00 2:19 AM, Paul Berkowitz at [EMAIL PROTECTED] wrote:

> On 12/14/00 10:50 PM, "Neil" <[EMAIL PROTECTED]> wrote:
>
>>> Check Auto Text Cleanup under the Edit menu.  It does most of the things
>>> that the script does (I wrote both).  You'll have to do the subject by hand
>>> though.
>>
>> Is that because Entourage isn't scriptable enough to do those other things?
>
>
> Please. Dan implemented the scripting for Emailer, OE 4, 4.5, 5 and for
> Entourage. They are all based on the same Apple Mail Suite but the scripting
> has become more and more sophisticated. Nevertheless, scripting all that
> text crap is extremely fussy and time-consuming. It can be done just as
> well, or usually, better in Entourage than in Emailer. But for everyday use,
> why in the world would you want to script this stuff when Dan has provided
> everything in the app itself? Please, why?


I was talking about the stuff that Entourage _can't_ easily fix with menu commands.  The Emailer script would take out all the accumulated "fwd" and "fw" from the subject line.  It also took out the accumulated message headers and the attribution line.  I was hoping that there would already be something like this floating around someplace.  I didn’t mean to ask anybody to do so much work.

I just checked my old script and I see that Dan is the one who wrote it.  Thanks Dan.  I also see that it is long and messy.  It looks like it was a lot of work.  Could we reuse some of it without too much trouble?  Would something similar to this work in Entourage?

       -- ���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 : http://explorer.msn.com”,””)

Originally, I wrote:

> I used to have a script in E-mailer that would clean-up jokes that I
> forward.  It would remove the accumulated "fwd" in the subject line and take
> out the attribution line.  I think it also took out all of the ">"
> characters at the start of each line.  That often accumulated too.  Does
> anybody have anything like that for En'rage?  As a bonus, it would be cool
> if it could take out the ad at the bottom from Hotmail:
> ________________________________________________________________________
> Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com

Reply via email to