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

RE: [Clip] Re: Problems with clip and deleting between text

Expand Messages
  • John Shotsky
    When debugging clips, I copy a small portion of a larger document and paste it into a new document, then run the clips on that. It doesn t need to be saved
    Message 1 of 10 , Jan 4, 2011
      When debugging clips, I copy a small portion of a larger document and paste it into a new document, then run the clips
      on that. It doesn't need to be saved first. That way, you can have just the item(s) you are looking for, the clips run
      fast, and you can undo your way back through it to see what was done, and when. You can also step back through it using
      redo. This way, you gain an understanding of exactly what your clips are doing, and in what order. It is similar to
      using debug, but is easier to manage, and you can reverse direction any time you need to.

      I also have a 'scratchpad' clip where I try things out. Just paste one or a few lines of clipcode there, and run it on
      your small document. As each bit of code is made to work right, give it its own home or add to an existing clip and then
      build some more. Use ^!GoTo Exit in your main body of clips to halt execution where you want it, then use your
      scratchpad clip to carry it from there on. That lets you run through your tested clips first, then stop exactly where
      needed to test the next thing.

      In this example, it would have run correctly, apparently, until the large file was attempted. That would tell you the
      code is right, but there is another problem. A large file would have a large undo buffer also, so your main memory could
      be exhausted, causing the swap file to become active. That's a much slower process, which could then introduce timing
      errors. This can be tested for by stopping other programs, using Task manager to stop unneeded background processes, and
      starting with a fresh copy of the large document, so there is no undo buffer in place. Depending on resources, that
      could be enough to get it to run correctly.

      Regards,
      John
      Recipe formatting tools:
      <http://recipetools.gotdns.com/> http://recipetools.gotdns.com
      Beaverton Weather:
      <http://shotsky.gotdns.com/> http://shotsky.gotdns.com


      From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of mikeyboy351
      Sent: Tuesday, January 04, 2011 4:48 AM
      To: ntb-clips@yahoogroups.com
      Subject: [Clip] Re: Problems with clip and deleting between text


      Don, Eb,
      I tried adding a delay of up to 20 just before the text was selected, after it was deleted and after the jump to the
      previous position at the start of the loop all to no avail. there was still clip text appearing in my loaded file and
      sometimes the text was not replaced. I even tried setting the debug option but with over 4000 lines of text it is not
      really an option. The files are 40M a piece and I have 4 of them to process.
      In the end I broke the 40M files into 3 (one for each month of takings) and retried and lo and behold even without the
      delay everything works fine. I am not sure why but I have solved the problem to some extent, the next thing to do is to
      automatically split the file... but that is for another day.
      The learning curve has been rather steep as this is my first foray into clip programming but I will persevere. Thanks
      for the help and suggestions.

      Regards

      Mike



      [Non-text portions of this message have been removed]
    • Don
      You might also add a test to see what is selected (get size of selection). I wonder if there is a maximum selection size that is being violated or something?
      Message 2 of 10 , Jan 4, 2011
        You might also add a test to see what is selected (get size of
        selection). I wonder if there is a maximum selection size that is being
        violated or something?
        Under view>options>advanced there are some limits specified. I wonder
        if the issue is on a particular part of the file -- however the fact
        that it does parts of the file suggests that its some sort of limit
        rather than some particular data.

        On 1/4/2011 8:50 AM, John Shotsky wrote:
        > When debugging clips, I copy a small portion of a larger document and paste it into a new document, then run the clips
        > on that. It doesn't need to be saved first. That way, you can have just the item(s) you are looking for, the clips run
      • Axel Berger
        ... Nope. If that were the reason, splitting the file would not help. Axel
        Message 3 of 10 , Jan 4, 2011
          Don wrote:
          > I wonder if there is a maximum selection size that is being
          > violated or something?

          Nope. If that were the reason, splitting the file would not help.

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