RE: Simple text - one more problem
RE: Simple text - one more problem
- Subject: RE: Simple text - one more problem
- From: "Script2" <email@hidden>
- Date: Wed, 9 Jul 2008 14:02:01 -0400
- Importance: Normal
I have no control on the body of text; it
could have any special characters or both slashes \ /.
Ruby
-----Original Message-----
From:
applescript-users-bounces+script2=email@hidden
[mailto:applescript-users-bounces+script2=email@hidden] On Behalf Of Michelle Steiner
Sent: Wednesday, July 09, 2008
1:21 PM
To: Applescript Users
Subject: Re: Simple text - one
more problem
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.
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