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

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

Expand Messages
  • Don
    Jan 3, 2011
    • 0 Attachment
      On 1/3/2011 6:32 AM, Eb wrote:
      > Michael,
      >
      > You didn't say HOW the clip doesn't work properly. So I can only suggest, that you add a ^!SetDebug 1 command at the point of your clip, where things start to go wrong. Then single-step through your code, and see if there is a point at which it does go wrong.
      >
      > If the single stepping works, then you have a timing problem. That you could cure by inserting some delays at key points. ^!Delay 2
      > for example (in tenths of seconds).
      >
      >
      > Good luck,
      >
      >
      > Eb
      >
      > --- In ntb-clips@yahoogroups.com, "mikeyboy351" <michael.linahan@...> wrote:
      >>
      >> Hi Oh knowledgeable ones,
      >> I have been writing a clip to automatically process the output from our point of sale machine. The clip is below and should remove the control chars, search for some text, mark the position and then search for the next part, mark this select the text between the marks and then delete it. I am obviously doing something wrong as it doesn't work properly. However, if I use the !^Continue and stop the clip, the correct text is highlighted and the delete key works. I have spend 3 days on this and am pulling my hair out at the moment so i hope that someone can prevent me from going completely bald!
      >>
      >> Regards
      >>
      >> Mike
      >> P.S. I can send a test file if anyone wants it.

      I too suspect that a delay may be required. I see that you are
      replacing with empty instead of a keyboard command. If that is the
      point where it is not going well, then try a minor delay there.

      I assume this may be the area?
      :DoFirst
      > ;^!Continue ^$GetParaRow$
      > ^!SelectTo 1:1
      >
      > ;delete the selected region
      > ^!SetCode %KeepText%=^$GetSelection$
      > ^!InsertText ^%EMPTY%


      I assume select to 1:1 may be taking a second.
    • Show all 10 messages in this topic