Title: Re: Double Spaces
This is really simple; this should do it.

Click this URL, or copy and compile:

<
http://tinyurl.com/6kag2>

-- Script "Collapse_space_runs" by Allen Watson
tell application "Microsoft Entourage"
    -- get the currently selected message or messages
    set selectedMessages to current messages
    -- if there are no messages selected, warn the user and then quit
    if selectedMessages is {} then
        display dialog "Please select a message first and then run this script." with icon 1
        return
    end if
    repeat with theMessage in selectedMessages
        -- get message's content into a variable
        set theContent to content of theMessage
        -- collapse space runs
        set oldDelims to AppleScript's text item delimiters
        repeat while the content contains "  "
            set AppleScript's text item delimiters to {"  "} -- Two spaces
            set theContent to text items of theContent
            set AppleScript's text item delimiters to {" "} -- One space
            set theContent to theContent as text
            set AppleScript's text item delimiters to oldDelims
        end repeat
        set the content of theMessage to theContent
    end repeat
end telV

On 11/29/04 1:30 PM, "Glenn Zieman" <[EMAIL PROTECTED]> wrote:

> Paul, you post here and the usergroup a script to remove double spaces. I
> had a major problem and had to reformat, so I no longer have the script.
> Could you be so kind as to repost it? Or is it in one of the script sites? I
> looked at the one in the link for Scripts and did not see it there.
>
>

Reply via email to