• 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: Paul Berkowitz <email@hidden>
  • Date: Tue, 31 Oct 2000 11:09:39 -0800

On 10/31/00 10:26 AM, "Marc K. Myers" <email@hidden> wrote:


>> 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?
>>
> You're confusing AppleScript's offset (string in a string) with TE+'s
> offset (text element in a text element). You can get the offset of
> "word 3" or "paragraph 6", but you can't get the offset of the string
> "CAT4". If you want the offset of a string you have to "find" it first
> and then get the offset of the selection:
>
> tell application "Tex-Edit Plus"
> search document 1 looking for "CAT4"
> set x to the offset of the selection
> end tell


Actually, I wasn't really confusing it. I specifically said that I wanted
to know how TE's offset worked, and that I knew it WASN'T the Standard
Additions offset. I realize that my first post was all wrong (and did
confuse the two things, unnecessarily and unfortunately - a red herring,
sorry), and that's why I sent the second post, which you quoted above.

Thanks very much for your reply. TE's offset evidently needs 'selection',
rather than 'document 1' or 'window 1'. That's the key. Many thanks.


--
Paul Berkowitz


References: 
 >Re: TE+ question (From: "Marc K. Myers" <email@hidden>)

  • Prev by Date: Re: Header Relief for Eudora users
  • Next by Date: Re: TE+ question [WAS Re: FMP question -- for Shane Stanley?]
  • Previous by thread: Re: TE+ question
  • Next by thread: Re: TE+ question [WAS Re: FMP question -- for Shane Stanley?]
  • Index(es):
    • Date
    • Thread