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

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

Expand Messages
  • Flo
    ... Thanks, Sheri! Another solution would be to change the clip as follows... ^!Select Line ^!If ^$StrPos( ^%test% ; ^$GetSelection$ ;0)$ 0 SKIP_2 ^!Select 0
    Message 1 of 32 , Jul 5, 2007
      --- In ntb-clips@yahoogroups.com, "Sheri" <silvermoonwoman@...> wrote:
      >
      > Hi Flo, Eb, scenario_t_c,
      >
      > Flo, To work on your sample, I think he would need:
      >
      > ^!Select EOL (instead of ^!Select Line) and
      > ^!DeleteLine (currently used)...

      Thanks, Sheri!

      Another solution would be to change the clip as follows...

      ^!Select Line
      ^!If ^$StrPos("^%test%";"^$GetSelection$";0)$ > 0 SKIP_2
      ^!Select 0
      ^!DeleteLine

      Obviously, we have to "unselect" the line before applying ^!
      DeleteLine.

      However, I would choose another solution for that task. Here is just
      a basic concept (without those details we discussed in "Creation of
      clip"):


      ^!Set %Search%=^?{Enter search string:}
      ^!SetListDelimiter ^P
      ^!Set %Lines%=^$GetDocMatchAll(^.*^%Search%.*$)$
      ^!Toolbar New Document
      ^!InsertText ^%Lines%


      With ^$GetDocMatchAll$ we can do without any ^!Find, Loops, cursor
      movements etc. which are slowing down a clip.

      I tested my proposal with 15.000 lines - it's doing the job within a
      second, whereas Eb's concept (even with "^!SetScreenUpdate Off")
      needs 34 second (on my notebook).

      Flo
       
    • 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
        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.