On Mar 25, 2012, at 20:35, James wrote:
> I'm working with various selections in a document, and at times the line 
> immediately following the selection needs to be read into a variable for 
> future comparison. Thus, let's say the two below columns represent two 
> different files. 
______________________________________________________________________

Hey James,

If I undersand correctly you'll have a selection that looks like this:



OR



try
  
  tell application "BBEdit"
    tell text of front text window
      set sel to selection
      set textOfSel to contents of selection
      repeat while last character of textOfSel is return
        set textOfSel to text 1 thru -2 of textOfSel
      end repeat
      set selLastLine to endLine of sel
      set nextLine to selLastLine + 1
      set nextLineText to contents of line nextLine
      
      {textOfSel, nextLineText}
      
    end tell
  end tell
  
on error eMsg number eNum
  set {c, s} to {return, "------------------------------------------"}
  set e to s & c & "Error: " & eMsg & c & s & c & "Error Number: " & eNum & c & 
s
  beep
  display dialog e
end try

Pretty straightforward.

--
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>

<<inline: BBEdit.snapz.001.jpg>>

<<inline: BBEdit.snapz.002.jpg>>

Reply via email to