Hey Folks,

In the first script 'topAnchor' and 'bottomAnchor' produce objects of class 
'line'.  It seems though that one cannot use that as a reference for selection.

tell application "BBEdit"
  tell text of front text window
    set topAnchor to first line whose contents is not ""
    set bottomAnchor to last line whose contents is not ""
    
    # THIS FAILS
    if topAnchor ≠ bottomAnchor then
      select (topAnchor thru bottomAnchor)
    end if
    
  end tell
end tell

To make it work I have to do something like this:

tell application "BBEdit"
  tell text of front text window
    set topAnchor to startLine of (first line whose contents is not "")
    set bottomAnchor to startLine of (last line whose contents is not "")
    select (lines topAnchor thru bottomAnchor)
  end tell
end tell

This is not a major problem; I just want to make certain I'm not missing an 
easier method.

TIA

--
Best Regards,
Chris

-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to