Title: Re: Fixing busted threads?
Thanks for your help Paul. I have the script up and running and it seems to be working well so far.
on run
tell application "Microsoft Entourage"
set currentMessages to the current messages
repeat with theMsg in the currentMessages
set theSubject to subject of theMsg
if theSubject contains "Re:" then
set sd to AppleScript's text item delimiters
set AppleScript's text item delimiters to {"Re: "} -- or ("Re:"}
set ls to text items of theSubject
set AppleScript's text item delimiters to {""}
set subject of theMsg to (ls as Unicode text)
set AppleScript's text item delimiters to sd
end if
end repeat
end tell
end run
on 11/1/04 7:53 PM, Paul Berkowitz <[EMAIL PROTECTED]> wrote:
> On 11/1/04 5:09 PM, "Mike Dano" <[EMAIL PROTECTED]> wrote:
>
>> Is there a way to remove all instances of "Re:" in a subject without having
>> to mark positions and do the "4 thru -1" type of calculations?
>
> Yes, but it will leave spaces:
>
> set theSubject to subject of theMsg
> if theSubject contains "Re:" then
> set AppleScript's text item delimiters to {"Re: "} -- or ("Re:"}
> set ls to text items of theSubject
> set AppleScript's text item delimiters to {""}
> set subject of theMsg to (ls as Unicode text)
> end if
>
>
> I recommend using {"Re: "}. It will remove the space at the end. I can't
> believe you'll hit any "Re:" without a space. (If you do, this version will
> miss it.)
- Re: Fixing busted threads? Mike Dano
- Re: Fixing busted threads? Paul Berkowitz
- Re: Fixing busted threads? Mike Dano
- Re: Fixing busted threads? Paul Berkowitz
- Re: Fixing busted threads? Allen Watson
