• 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: zapping gremlins
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: zapping gremlins


  • Subject: Re: zapping gremlins
  • From: "Marc K. Myers" <email@hidden>
  • Date: Tue, 17 Apr 2001 19:08:04 -0400
  • Organization: [very little]

> Date: Tue, 17 Apr 2001 10:49:32 -0500
> To: <email@hidden>
> From: Erik Ness <email@hidden>
> Subject: zapping gremlins
>
> Greetings,
>
> Anyone have a boilerplate AS they can share for removing bad
> characters (control characters, primarily) from a block of text?
>
> Regards,
>
> Erik Ness

property gremList : {"a", "e", "i", "o", "u"}

set theText to the clipboard
set od to AppleScript's text item delimiters
repeat with aGremlin in gremList
set AppleScript's text item delimiters to {contents of aGremlin}
set theText to (text items of theText)
set AppleScript's text item delimiters to od
set theText to (theText as text)
end repeat
set the clipboard to theText

Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074

[4/17/01 7:07:53 PM]


  • Prev by Date: Re: Naming Quark boxes - screwed up!
  • Next by Date: Re: Random number generator without duplicates?
  • Previous by thread: Re: zapping gremlins
  • Next by thread: Re: zapping gremlins
  • Index(es):
    • Date
    • Thread