MACSCRPT Archives

September 2008

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:
RJay Hansen <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Thu, 18 Sep 2008 14:16:47 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (27 lines)
I'm writing a script that's intended to parse out text that is  
enclosed within underscores (_like this_). I'm using Tex-Edit Plus  
and Smile.

I'm putting text selected in Tex-Edit Plus into a variable then  
getting what I need working with the text in the variable. Once I  
have it, I want to replace the string surrounded by the underscores  
(and including the underscores) with the new string using this:

set words beginItal thru endItal of theText to newString

beginItal and endItal are the indexes of the underscores. theText is  
the variable that the selection from the document is read into and  
newString is of course, the replacement string.

Smile comes back with "Can't set words 23 thru 32 of theText (it puts  
the actual string in the error message/not the variable name as shown  
here) to newString (and again, it puts the new string in the error  
message, not the variable name)".

I haven't been able to figure out why I can't do this. Any help would  
be appreciated.

Thanks,

RJay

ATOM RSS1 RSS2