Re: can I do this better?
Re: can I do this better?
- Subject: Re: can I do this better?
- From: "Paul F. Henegan" <email@hidden>
- Date: Thu, 13 Jun 2002 07:32:53 -0400
on 13.06.2002 02:36, garrett at email@hidden wrote:
>
Thanx to everyone who helped me out - gives me a bit of insight into the
>
diff ways people get the same task done.
>
>
>
Thanx for all yer help :)
Hi Garrett,
For some reason I haven't seen all of this thread; hope this isn't
iteratively redundant :/
======================================================================
--trim leading and trailing white space from selection
set WhiteChars to {" ", return, tab}
set Trimmed to false
repeat until Trimmed
if character -1 of theSelection is in WhiteChars then
set theSelection to characters 1 thru -2 of theSelection as
[NO-BREAK]text
else if character 1 of theSelection is in WhiteChars then
set theSelection to characters 2 thru -1 of theSelection as
[NO-BREAK]text
else
set Trimmed to true
end if
end repeat
======================================================================
[formatted using ScriptToEmail - gentle relief for mailing list pains]
[
http://files.macscripter.net/ScriptBuilders/ScriptTools/ScriptToEmail.hqx]
Obviously testing for proper selection length should occur before...
Peace,
paul
--
Paul F. Henegan
<email@hidden>
_______________________________________________
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.