Re: BBEdit Insertion Point Line Number
Re: BBEdit Insertion Point Line Number
- Subject: Re: BBEdit Insertion Point Line Number
- From: Bob Studer <email@hidden>
- Date: Sun, 16 Jan 2005 16:25:22 -0800
On Jan 16, 2005, at 3:18 PM, Gil Dawson wrote:
At 9:54 PM +0000 1/16/05, Rob Stott wrote:
>tell application "BBEdit"
> tell text window 1
> set theSelection to the selection
> end tell
>end tell
This produces a very interesting result. It shows up in my Result window as...
insertion point after character 13414 of window "TestBook.txt" of application "BBEdit 4.5"
Is there a way to get a line number out of this result?
According to the dictionary of TextWrangler, BBEdit's little brother, startLine is a property of text_object from which insertion point inherits. So:
tell application "BBEdit"
tell text window 1
set theLine to startLine of the selection
end tell
end tell
should set theLine to the first line of the selection.
-Bob
PGP: 0x5A969850
---------------------
I tend to think of [Mac] OS X as Linux with QA and Taste.
-James Gosling, Java Architect
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden