• 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: "Marc K. Myers" <email@hidden>
  • Date: Tue, 31 Oct 2000 13:26:14 -0500
  • Organization: [very little]

Paul Berkowitz wrote:
> Date: Tue, 31 Oct 2000 08:36:41 -0800
> Subject: TE+ question [WAS Re: FMP question -- for Shane Stanley?]
> From: Paul Berkowitz <email@hidden>
>
> On 10/31/00 8:27 AM, I wrote:
>
> > 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

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

Marc [10/31/00 12:40:32 PM]


  • Follow-Ups:
    • Re: TE+ question
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: Header Relief for Eudora users
  • Next by Date: Re: Header Relief for Eudora users
  • Previous by thread: Re: applescript-users digest, Vol 3 #1 - 14 msgs
  • Next by thread: Re: TE+ question
  • Index(es):
    • Date
    • Thread