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
|