MACSCRPT Archives

October 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:
Wed, 1 Oct 2008 16:50:17 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (76 lines)
It does look like that's the problem. I just tested with another  
paragraph. Works with 255 characters. Fails w/256.

RJay


On Oct 1, 2008, at 4:08 PM, Paul Skinner wrote:

> It appears that way as your first query was 254 characters and the  
> second exceeded 256. Is there a reason that you are searching for  
> such a large block of text, or are you just testing your code to  
> the edge cases?
>
>
> On Oct 1, 2008, at 5:04 PM, RJay Hansen wrote:
>
>> You think there's a 256 character limit?
>>
>> RJay
>>
>>
>> On Oct 1, 2008, at 3:22 PM, Paul Skinner wrote:
>>
>>> I suspect that it's because the second term is 258 characters.
>>>
>>> On Oct 1, 2008, at 3:12 PM, RJay Hansen wrote:
>>>
>>>> Using Tex-Edit Plus' "search" command from the Tex-Edit Suite in  
>>>> its AppleScript dictionary, on this paragraph:
>>>>
>>>> "And, as Lantano made his way through the basement, among the  
>>>> cots, stepping over people, their meager stores, saying hello  
>>>> here, smiling to someone there, Nicholas thought, _My god, when  
>>>> he came through the entrance he looked like an old man,  
>>>> weathered, dried-out, but now, closer, Lantano appeared middle- 
>>>> aged; the aura of extreme age had been an illusion due to the  
>>>> scrawny quality of the man and the peculiar stiffness in the way  
>>>> he walked; it was as if he were delicate, feared an injury, a  
>>>> fall._"
>>>>
>>>> If I do this:
>>>>
>>>> tell application "Tex-Edit Plus"
>>>> 	search paragraph 2 of document 1 looking for "My god, when he  
>>>> came through the entrance he looked like an old man, weathered,  
>>>> dried-out, but now, closer, Lantano appeared middle-aged; the  
>>>> aura of extreme age had been an illusion due to the scrawny  
>>>> quality of the man and the peculiar stiffness in the"
>>>> end tell
>>>>
>>>> Tex-Edit selects the string within the paragraph and the script  
>>>> returns "true". However if I add one more word to that search  
>>>> string like so:
>>>>
>>>> tell application "Tex-Edit Plus"
>>>> 	search paragraph 2 of document 1 looking for "My god, when he  
>>>> came through the entrance he looked like an old man, weathered,  
>>>> dried-out, but now, closer, Lantano appeared middle-aged; the  
>>>> aura of extreme age had been an illusion due to the scrawny  
>>>> quality of the man and the peculiar stiffness in the way"
>>>> end tell
>>>>
>>>> I get an error:
>>>>
>>>> Tex-Edit Plus got an error: Can't make some data into the  
>>>> expected type
>>>>
>>>> with "search paragraph 2 of document 1 looking for......etc"  
>>>> highlighted.
>>>>
>>>> Anyone have any ideas what the problem is here? A bug?
>>>>
>>>> Thanks,
>>>>
>>>> RJay

ATOM RSS1 RSS2