• 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
Recursive Character Replacing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Recursive Character Replacing


  • Subject: Recursive Character Replacing
  • From: James Naylor <email@hidden>
  • Date: Thu, 4 Sep 2003 17:34:46 +0100

Hi guys,

little advice required. I have a long script, which basically generates a
decent sized chunk of text (held in myArticleString variable) which gets
output to a file.

Before I output the string to a file, I need to do some basic character
replacement, which i currently do with the following:

set myDosArticle to my replace_chars(myArticleString, return, CRLF)
set myDosArticle to my replace_chars(myDosArticle, "", "\"")
set myDosArticle to my replace_chars(myDosArticle, "", "\"")
set myDosArticle to my replace_chars(myDosArticle, "", "'")
set myDosArticle to my replace_chars(myDosArticle, "", "'")
set myDosArticle to my replace_chars(myDosArticle, "", "-")
set myDosArticle to my replace_chars(myDosArticle, "<00AD>", "")
set myDosArticle to my replace_chars(myDosArticle, "<FFFD>", "")
set myDosArticle to my replace_chars(myDosArticle, "<E06E>", "")
set myDosArticle to my replace_chars(myDosArticle, "<E06C>", "*")

(among others!). The replace_chars subroutine is taken from the applescript
essential subroutines on the applescript site.

My question - is there a more efficient way to do this (programatically)? I
am a relatively new applescripter (this list has been great for learning...), and any advice is appreciated!

Cheers,

James
_______________________________________________
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.

  • Prev by Date: Searching for a folder in Applescript.
  • Next by Date: Re: Do shell script question
  • Previous by thread: Re: Searching for a folder in Applescript.
  • Next by thread: Re: Recursive Character Replacing
  • Index(es):
    • Date
    • Thread