MACSCRPT Archives

July 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:
Timothy Bates <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Thu, 13 Jul 2006 16:34:20 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (17 lines)
>> Meanwhile, the Satimage "find text" is also producing errors, again
>> when the target string is not present.

You could use regexps that find nothing if that is what is present

find text "[123]*$" in "1345" with regexp
--> {matchPos:4, matchLen:0, matchResult:""}

However failing to find something (that is missing) might be an error in the
unput data. You just trap it.

try
    find text "[123]+$" in "1345" with regexp
on error m
    display dialog m
end try

ATOM RSS1 RSS2