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