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

Re: [Clip] How to set a clip capable of deleting lines without particaluar content?

Expand Messages
  • loro
    Hi! ... Sure, in a number of ways. I m not sure if you want a clip or if you rather want hints about how to write one yourself. I hope I don t destroy your fun
    Message 1 of 32 , Jul 5, 2008
    • 0 Attachment
      Hi!

      ¼@±¡¨g wrote:
      >I would want to create a clip that could search through the file
      >and delete all lines without the string the user entered.
      >
      >Could this actually be achieved? Any help would be appreciated.

      Sure, in a number of ways. I'm not sure if you want a clip or if you
      rather want hints about how to write one yourself. I hope I don't
      destroy your fun now by giving you a clip... You can look the
      commands and other things up in Help.

      Copy between the lines. Right-click in the clipbook window and choose
      "Add from Clipboard to add it to the open clip library.

      ------------------------------
      h="DeleteLinesWithout"
      ^!Set %string%=^?[]
      ^!Jump text_start
      :loop
      ^!IfFalse ^$StrPos("^%string%";"^$GetLine$";0)$ del else keep
      :keep
      ^!Jump +1
      ^!Goto fin
      :del
      ^!DeleteLine
      :fin
      ^!If ^$GetRow$ = ^$GetLineCount$ end
      ^!Goto loop
      ------------------------------

      Lotta
    • loro
      ... Thank you, Flo. At least there is a significant difference. I m a little shocked. I hadn t noticed before that Notetab has gotten slower in some respects.
      Message 32 of 32 , Jul 6, 2008
      • 0 Attachment
        Flo wrote:
        >With ^!SetScreenUpdate Off your Clip needs 32 seconds to run my test
        >(reducing 15,000 to 234 lines). I'm working with a 1,6-GHz-Notebook.

        Thank you, Flo. At least there is a significant difference. I'm a
        little shocked. I hadn't noticed before that Notetab has gotten
        slower in some respects.

        Lotta
      Your message has been successfully submitted and would be delivered to recipients shortly.