• 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: Simple text - one more problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple text - one more problem


  • Subject: Re: Simple text - one more problem
  • From: Michelle Steiner <email@hidden>
  • Date: Wed, 9 Jul 2008 10:21:00 -0700


On Jul 9, 2008, at 9:38 AM, Script2 wrote:

Why does this script ignore \ within the text body?

Well, first of all, you have "/" in the text body; you don't have "\" there.

And the script as written (with the slash), works properly.

Secondly, "\" (a backslash) is a special character; it is used to impart a feature to the following character.  For instance, if you want to have a quotation mark (") within the text, you need to preface it with the slash.  For another instance, as in your text, if it is followed by the letter "n", both are replaced by a new-line.  Similarly, followed by an "r" results in a carriage return.  And a "t" results in a tab.  And finally, followed by itself results in a single "\" in any output (like a dialog).

If it is followed by any character not defined as a token to follow it, compiling results in an error.

-- Michelle


--
Your right to free speech does not incur an obligation for anyone to listen.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • RE: Simple text - one more problem
      • From: "Script2" <email@hidden>
References: 
 >Simple text - one more problem (From: "Script2" <email@hidden>)

  • Prev by Date: Re: Find script files
  • Next by Date: RE: Simple text - one more problem
  • Previous by thread: Simple text - one more problem
  • Next by thread: RE: Simple text - one more problem
  • Index(es):
    • Date
    • Thread