Re: BBEdit 5 & selection-object
Re: BBEdit 5 & selection-object
- Subject: Re: BBEdit 5 & selection-object
- From: Christian Smith <email@hidden>
- Date: Sat, 24 Feb 2001 07:57:59 -0500
On Friday, February 23, 2001 at 21:46, Ricardo Montiel wrote:
>
This works in BBEdit 5.1 to "record" a selected chunk of characters (for
>
example, as the result of a find task or as the result of a manual
>
selection; why bother with line numbers?), but it's not functional in v6.x:
>
>
set xSelStart to selection start
>
set xSelEnd to selection end
>
>
>
Do your stuff and then, when you need to reselect the text, use:
>
>
select (characters xSelStart thru xSelEnd)
The syntax has changed in 6.0 but it is still possible to do this:
tell application "BBEdit 6.0"
set m to offset of selection of text window 1
set n to m + ((length of selection of text window 1) - 1)
select characters m thru n of text window 1
end tell
--
Christian Smith | email@hidden |
http://web.barebones.com
PGP Fingerprint - 60E5 2216 97D2 1D1A B923 F036 00A9 CEC0 D411 FA89