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

24325Re: Using toolbar on multiple, separated lines

Expand Messages
  • flo.gehrke
    Jan 29, 2014
      --- In ntb-clips@yahoogroups.com, Alec Burgess <buralex@...> wrote:
      >
      > Note: AFAICT the Number lines step requires an [OK] or entry of
      > a line number followed by [OK] (...)
      > @anyone - is there any clip commands that avoids the manual
      > entry for ^!Menu Lines\"Number lines"?

      No, but as a work-around I use...

      ^!KeyboardDelay 50
      ^!Keyboard CTRL+A ALT+M L N #1# ENTER

      BTW: In your approach, you could save yourself the numbering by executing a kind of "selective editing". Given a list like...

      1. Apples
      10. SENTENCE ME 1
      2. Bananas
      20. SENTENCE ME 2
      3. Oranges
      30. SENTENCE ME 3
      4. Plums

      The following clip will change the case in all lines where the line number ends with '0':

      ; Mark selected lines with '@'
      ^!Replace "^(?=\d0)" >> "@" WARS
      ^!Set %Lines%=^$GetDocListAll("^@\K.+";"$0\r\n")$
      ^!Toolbar New Document
      ^%Lines%
      ^!Select All
      ^!Toolbar Sentence
      ^!SetListDelimiter ^%NL%
      ^!SetArray %SentLines%=^$GetText$
      ^!Close Discard
      ^!Jump Doc_Start
      ^!Set %Id%=1

      :Loop
      ^!Find "^@.+$" RS
      ^!InsertText ^%SentLines^%Id%%
      ^!Inc %Id%
      ^!If ^%Id% < ^%SentLines0% Loop

      Regards,
      Flo


      P.S. Please note: This is a reply to Alec and not meant as a solution to John's question. IMHO, there's no way to create a "one-liner" that would do this job.
    • Show all 12 messages in this topic