• 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: BBEdit 5 & selection-object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BBEdit 5 & selection-object


  • Subject: Re: BBEdit 5 & selection-object
  • From: M Shaw <email@hidden>
  • Date: Thu, 22 Feb 2001 23:20:40 -0800 (PST)

I had trouble with that one too, I think it's just confusing
documentation. I believe object is there as a descriptor not code. I
found these to work, although I lay no claim to their correctness :-)

on run
tell application "BBEdit 5.1"

set ln to (the number of lines of window 1)
set stln to startLine of selection as integer
set edln to endLine of selection as integer

set s31 to the offset of character 1 of line stln
set s32 to the offset of selection as integer


set e31 to the offset of character 1 of line edln
set e33 to the length of selection as integer

-- you can manipulate these numbers and then reselect text eg.
select characters s31 through e32 of line stln

end tell
end run

> Hallo,
>
> I wrote this:
>
> set x to line of selection-object
>
> After compile I get this:
>
> set x to (line of selection) - object
>
> What is wrong?
>
> Iam using BBEdit 5.0 and Script Debugger 1.0.4.
>
> Thank you
>
> Daniel Komrska jr.


  • Prev by Date: Scheduling Tasks With Applescript
  • Next by Date: Re: setting finder window positions
  • Previous by thread: Re: BBEdit 5 & selection-object
  • Next by thread: Re: BBEdit 5 & selection-object
  • Index(es):
    • Date
    • Thread