Title: Re: Double spaces
On 11/15/04 7:20 PM, "Glenn Zieman" <[EMAIL PROTECTED]> wrote:

> Is there a short cut or a script to remove double spaces and replace them
> with a single space?

Hmmm. I just answered that on the newsgroup thus morning.

Here. Paste this into Script Editor, save it as a Script (the default) in ~/Documents/Microsoft User Data/Entourage Script Menu Items.

Give it a name such as "Fix Double Spaces" and add a code at the end to give it a keyboard shortcut if you wish. (See "Abut the script menu" in Entourage Help.) It woks for plain text. In HTML it will remove formatting - no way around that, I'm afraid.

Select it in the script menu or press the keyboard shortcut you give it when you have a new message window in the front., It just beeps otherwise.



tell application "Microsoft Entourage"
    if {class of window 1} is not in {draft window, draft news window} then
       beep
       return
   end if
   set theText to content of window 1
    set AppleScript's text item delimiters to {"  "}
    set chunks to text items of theText
   set AppleScript's text item delimiters to {" "}
    set theText to chunks as Unicode text
   set content of window 1 to theText
end tell


--
Paul Berkowitz

Reply via email to