• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: TE+ question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • plain text from clipboard
      • From: paul skinner <email@hidden>
  • Prev by Date: Re: FMP question -- for Shane Stanley?
  • Next by Date: Error -5190
  • Previous by thread: Re: Joining things to form a variable name
  • Next by thread: plain text from clipboard
  • Index(es):
    • Date
    • Thread