• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: BBEdit Insertion Point Line Number
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: BBEdit Insertion Point Line Number
      • From: Gil Dawson <email@hidden>
    • Re: BBEdit Insertion Point Line Number
      • From: Jason Davies <email@hidden>
References: 
 >Re: Require some help. (From: Gil Dawson <email@hidden>)
 >Re: Require some help. (From: Rob Stott <email@hidden>)
 >BBEdit Insertion Point Line Number (From: Gil Dawson <email@hidden>)

  • Prev by Date: BBEdit Insertion Point Line Number
  • Next by Date: Deep or Bug?
  • Previous by thread: BBEdit Insertion Point Line Number
  • Next by thread: Re: BBEdit Insertion Point Line Number
  • Index(es):
    • Date
    • Thread