Title: Re: Remove Double spaces
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
> From: Glenn Zieman <[EMAIL PROTECTED]>
> Reply-To: "Entourage:mac Talk" <[EMAIL PROTECTED]>
> Date: Wed, 01 Dec 2004 20:50:18 -0600
> To: Entourage <[EMAIL PROTECTED]>
> Subject: Re: Remove Double spaces
>
> Still does not work. The one that Paul posted did work. Real short. Could it
> be reposted?
> Thanks.
>
> On 12/1/04 5:01 PM, "Barry Wainwright" <[EMAIL PROTECTED]> wrote:
>
>> Another error:
>>
>> repeat while the content contains " "
>>
>> Should read:
>>
>> repeat while theContent contains " "
>>
>>
>> --
>> Barry Wainwright
>> Microsoft MVP (see http://mvp.support.microsoft.com for details)
>> Seen the All-New Entourage Help Pages? - Check them out:
>> <http://www.entourage.mvps.org/>
>>
>>
>>> From: Glenn Zieman <[EMAIL PROTECTED]>
>>> Reply-To: "Entourage:mac Talk" <[EMAIL PROTECTED]>
>>> Date: Wed, 01 Dec 2004 13:10:15 -0600
>>> To: Entourage <[EMAIL PROTECTED]>
>>> Subject: Re: Remove Double spaces
>>>
>>> As Paul pointed out there was an error in the script (both at tinyURL and
>>> below. Also below has another error the last 'end TelV' is wrong too. Should
>>> be 'end Tell'
>>> With the above corrections the script will compile, but does not work.
>>>
>>> On 11/29/04 4:42 PM, " Allen Watson <[EMAIL PROTECTED]> wrote:
>>>
>>> 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.
>>>
>>>
>>> --
>>> To unsubscribe:
>>> <mailto:[EMAIL PROTECTED]>
>>> archives:
>>> <http://www.mail-archive.com/entourage-talk%40lists.letterrip.com/>
>>> old-archive:
>>> <http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>
>>>
>>
>>
>> --
>> To unsubscribe:
>> <mailto:[EMAIL PROTECTED]>
>> archives:
>> <http://www.mail-archive.com/entourage-talk%40lists.letterrip.com/>
>> old-archive:
>> <http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>
>>
>
>
> --
> To unsubscribe:
> <mailto:[EMAIL PROTECTED]>
> archives:
> <http://www.mail-archive.com/entourage-talk%40lists.letterrip.com/>
> old-archive:
> <http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>
>
>
- Re: Remove Double spaces Paul Berkowitz
- Re: Remove Double spaces Peter C.S. Adams
- Re: Remove Double spaces Glenn Zieman
- Re: Remove Double spaces Paul Berkowitz
- Re: Remove Double spaces Stephen Duxbury - Prestset
- Re: Remove Double spaces Paul Berkowitz
- Re: Remove Double spaces Allen Watson
