Re: BBEdit 5 & selection-object
Re: BBEdit 5 & selection-object
- Subject: Re: BBEdit 5 & selection-object
- From: Michelle Steiner <email@hidden>
- Date: Sat, 24 Feb 2001 09:00:31 -0800
On 2/24/01 4:57 AM, Christian Smith <email@hidden> wrote:
>
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
Why bother with all that calculation?
tell application "BBEdit 6.0"
activate
set x to the selection
select character 1 of the front window
--or do something more useful :)
select x
end tell
the log shows the following:
tell application "BBEdit 6.0"
activate
get selection
--> characters 158 thru 459 of text window 1
select character 1 of window 1
select characters 158 thru 459 of text window 1
end tell
--Michelle
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------