Re: TE+ question
Re: TE+ question
- Subject: Re: TE+ question
- From: Richard 23 <email@hidden>
- Date: Wed, 1 Nov 2000 07:03:11 -0800
>
> When I say:
>
>
>
> get offset of "CAT4" in "1 CAT4"
>
>
>
> or
>
> get offset of "c" in "abc"
>
>
>
> it says "Can't get offset of "c" in "abc". Access not allowed."
>
>
>
> Does anyone know what the correct syntax is?
>
>
More to the point:
>
>
When I say
>
>
get offset of "CAT4" in document 1
>
>
it also errors. According to TE+'s dictionary,
>
>
offset integer [r/o] -- the offset from the beginning of the document,
>
in characters
>
>
so I'm not sure what's wrong here. Does anyone?
Paul Berkowitz
--__--__--
Silly boy.
It's a property not a function.
offset is a property of text which can be character, word, paragraph,
line, etc.
example:
tell application "Tex-Edit Plus"
tell document 1
get offset of selection of document 1
--> 186
get offset of paragraph 2 of document 1
get offset of word 50 of document 1
get offset of last style run of document 1
get offset of line 23 of document 1
get offset of word 50 of document 1
get offset of last style run of document 1
--> 777
search document 1 looking for "resource fork" finding next
get selection's {offset, length}
--> {670, 13}
end tell
end tell