• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: can I do this better?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: can I do this better? (From: garrett <email@hidden>)

  • Prev by Date: Re: Trying Again! Similar path problem - please help!
  • Next by Date: Re: Easy, i think, Mount Volume Question?
  • Previous by thread: Re: can I do this better?
  • Next by thread: Re: can I do this better?
  • Index(es):
    • Date
    • Thread