Loading ...
Sorry, an error occurred while loading the content.

23645Re: [Clip] Text selection boundaries

Expand Messages
  • Don
    Feb 4 8:14 AM
    • 0 Attachment
      On 2/4/2013 8:19 AM, Jean-Fran├žois Colas wrote:
      > Hello list,
      >
      > Maybe I missed something obvious... Is there any way to determine the
      > coordinates (at least the row number) of the starting and ending points
      > of a selection?
      >
      > Thaks,
      > J.-F.

      Fascinating! If you find the cursor blinks after the last character of
      the selection on my screen, but if you use getrow and getcol it marks
      the first character of the selection (not where the cursor is blinking).
      I then jump selection end and capture it.

      There are several other ways I can think of to do this, but this worked
      just fine:
      ^!SetDebug On
      ^!SetWordWrap Off
      ;FILL IN YOUR OWN SEARCH TERM
      ^!Find "SEARCH TERM" CIWS
      ^!Set %selection_start_row%="^$GetRow$"
      ^!Set %selection_start_col%="^$GetCol$"
      ^!Jump Select_End
      ^!Set %selection_end_row%="^$GetRow$"
      ^!Set %selection_end_col%="^$GetCol$"
      ;LONG LINE FOLLOWS
      ^!Info [C]Selection Start (row:col):
      ^%selection_start_row%:^%selection_start_col%^PSelection Stop (row:col):
      ^%selection_end_row%:^%selection_end_col%
      ;END OF LONG LINE
      ^!SelectTo ^%selection_start_row%:^%selection_start_col%
    • Show all 5 messages in this topic