MACSCRPT Archives

June 2006

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Emmanuel <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Wed, 7 Jun 2006 14:12:56 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (48 lines)
At 10:10 PM +1300 6/7/06, Joe Barwell wrote:
>Secondly, I find Satimage osax's behaviour unpredictable as regards
>escaped characters. For example, "\\r" or "\\t" often seem to be
>being treated as literals, instead of escaped special characters, but
>I can't find a logical pattern as to where their use is
>recognized/not.

Maybe what is confusing you is that when used "with regexp" the osax 
follows the Regular Expressions syntax, while when used without 
regexp the osax follows AppleScript's rules only.

Also, another thing which can yield confusion is that, *inside 
quotes*, you can write \r and AppleScript understands return. Look.

this will work:

----------------
find text "\r" in "hello
world"
----------------

this will work:

----------------
find text "\r" in "hello
world" with regexp
----------------

this will work:

----------------
find text "\\r" in "hello
world" with regexp
----------------

this will not work, because "hello world" does not contain a 
backslash followed with r:

----------------
find text "\\r" in "hello
world"
----------------

Now, Joe, maybe you would be able to provide us with a more specific 
unwanted behavior.

Emmanuel

ATOM RSS1 RSS2