Re: Remove spaces
Re: Remove spaces
- Subject: Re: Remove spaces
- From: Kai <email@hidden>
- Date: Fri, 27 Jun 2003 04:12:21 +0100
on Thu, 26 Jun 2003 19:16:14 -0400, Gary Lists wrote:
>
On or about 6/26/03 3:44 PM, Bernard Azancot wrote:
>
>
> Le jeudi, 26 jun 2003, ` 20:19 Europe/Paris,
>
> email@hidden a icrit :
>
>
>
>> set nbr to words of "xx xx xx xx"
>
>> set text item delimiters to ""
>
>> set nbr to nbr as string
>
>
>
> Thanks for your help Malcolm.
>
> Unfotunately, I got the following error message: <Can't set TID to "">
>
>
>
> I may have missed something.
>
>
Works just fine OMM. With or without any delimiters play.
>
>
set nbr to words of "xx xx xx xx"
>
set nbr to nbr as string
>
--> "xxxxxxxx"
Sounds like Bernard may have inserted the code into a tell "Tex-Edit Plus"
block:
================================
tell application "Tex-Edit Plus"
set nbr to words of "xx xx xx xx"
set text item delimiters to ""
set nbr to nbr as string
end tell
--> "Tex-Edit Plus got an error: Can't set text item delimiters to \"\"."
================================
This is an example of where the use of "AppleScript's" (or, for JD's
benefit, "my") is required:
================================
tell application "Tex-Edit Plus"
set nbr to words of "xx xx xx xx"
set AppleScript's text item delimiters to ""
set nbr to nbr as string
end tell
--> "xxxxxxxx"
================================
However, if you're one of those who resets tids after using them[1], then
setting the tids shouldn't be necessary here:
================================
tell application "Tex-Edit Plus"
set nbr to words of "xx xx xx xx" as string
end tell
--> "xxxxxxxx"
================================
[1] Personally, I prefer to wash the dishes after meals ;-)
--
Kai
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.