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

Re: Problems with clip and deleting between text

Expand Messages
  • mikeyboy351
    Eb, Thanks for the prompt response. The problem is that the selected text doesn t delete when it is fully automated but if I use the !^Continue, halt the code
    Message 1 of 10 , Jan 3, 2011
    • 0 Attachment
      Eb,
      Thanks for the prompt response.

      The problem is that the selected text doesn't delete when it is fully automated but if I use the !^Continue, halt the code and then use the delete key it works fine but for one replace only. I thought that it might be something to do with loosing the position of the start and end places to select but I am not sure. When automated the first few times through the loop seem fine but after about 20 replaces it seems to stop working as it should and sometimes the between text is deleted and sometimes not and there is also some corruption with clip code being inserted into my text files. The test files i am working on are very large. I have solved the problem using Excel and writing some vba but I would like it to be done in notetab as some of the text lines have characters that excel recognises as equations.

      Regards

      Mike
    • Don
      I hate excel -- for just such reasons :-) You can format the excel document as text before starting and solve that problem -- which I do when working with
      Message 2 of 10 , Jan 3, 2011
      • 0 Attachment
        I hate excel -- for just such reasons :-)
        You can format the excel document as text before starting and solve that
        problem -- which I do when working with times which it mistakes for dates.

        It sounds like you may have a memory issue -- try adding some clear
        variables in to clean up the memory as you go.

        Without testing it I'm kind of shooting in the dark here.

        On 1/3/2011 7:11 AM, mikeyboy351 wrote:
        > Eb,
        > Thanks for the prompt response.
        >
        > The problem is that the selected text doesn't delete when it is fully automated but if I use the !^Continue, halt the code and then use the delete key it works fine but for one replace only. I thought that it might be something to do with loosing the position of the start and end places to select but I am not sure. When automated the first few times through the loop seem fine but after about 20 replaces it seems to stop working as it should and sometimes the between text is deleted and sometimes not and there is also some corruption with clip code being inserted into my text files. The test files i am working on are very large. I have solved the problem using Excel and writing some vba but I would like it to be done in notetab as some of the text lines have characters that excel recognises as equations.
        >
        > Regards
        >
        > Mike
      • mikeyboy351
        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
        Message 3 of 10 , Jan 4, 2011
        • 0 Attachment
          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
        • Don
          ... I m guessing memory issues may be the thing. The set debug can go anywhere and it can be triggered on a counter if you want to. The learning curve is worth
          Message 4 of 10 , Jan 4, 2011
          • 0 Attachment
            On 1/4/2011 7:47 AM, mikeyboy351 wrote:
            > 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

            I'm guessing memory issues may be the thing.
            The set debug can go anywhere and it can be triggered on a counter if
            you want to.
            The learning curve is worth it so keep at it -- but it took me a while
            as well.
          • 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 5 of 10 , Jan 4, 2011
            • 0 Attachment
              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 6 of 10 , Jan 4, 2011
              • 0 Attachment
                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 7 of 10 , Jan 4, 2011
                • 0 Attachment
                  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.