Title: Re: Script Help Please?
You need to copy the “on SearchReplace” handler code into the Entourage script.

Dan

On 12/28/00 9:57 AM, "Neil" <[EMAIL PROTECTED]> wrote:

I tried to update the “Clean Forward” script from Emailer to use in Entourage, but I got the following error message when I ran it:

<<Script>> doesn't understand the SearchReplace message.             

Here is the script I ran:

tell application "Microsoft Entourage"
    --
���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 can get rid of the ad at the bottom of hotmail messages:
   set theText to my SearchReplace(theText, ¬
        "Get more from the Web.  FREE MSN Explorer download : htp://explorer.msn.com", "")
end tell

I would appreciate any help.  Thanks in advance,

Neil



Reply via email to