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

Re: [Clip] (unknown)

Expand Messages
  • Stephen
    Hi Hans, I thought there was an assortment of things which labored together to keep your clip from working rightly. I ve fixed it (to what I think you wanted
    Message 1 of 4 , May 7 4:39 PM
    • 0 Attachment
      Hi Hans,
      I thought there was an assortment of things
      which labored together to keep your clip from
      working rightly.
      I've fixed it (to what I think you wanted it doing) and
      annotated my changes.
      Hope it helps,
      Stephen



      H="hans'sline"
      ^!ClearVariables
      ; I added another variable to contain the value
      ; of the row number. I'm not sure it's necessary,
      ; but makes me feel better.
      ^!Set %linerow%=^$GetRow$

      :Loop
      ; The next line of code was:
      ; ^!Set %lines%=^&
      ; Using the function GetSelection creates a new value
      ; every time this line is iterated.
      ; The ^& function does not do this.
      ; I also moved this part of the code into the loop.
      ^!Set %lines%=^$GetSelection$
      ^!Set %x%=^$StrDelete("^%lines%";1;3)$
      ^!Append %s%=^%x%^%NL%
      ; The next couple of lines use the new variable,
      ; but otherwise don't do anything exciting.
      ^!Inc %linerow%
      ^!SetCursor ^%linerow%:1
      ^!Select LINE
      ; The next line of code was:
      ; ^!If ^%lines%<1 End
      ; What the original line did was check
      ; whether character position of the first
      ; letter of the string was less than that
      ; of the ascii character "1".
      ; I'm not sure what you need, but I
      ; used a function to see if the cursor
      ; was at the end of the document.
      ^!If ^%linerow%>=^$GetTextLineCount$ SKIP
      ; The nest line of code was:
      ; :GotoLoop
      ; There are two problems with it.
      ; The first is that it is a label and not a command
      ; so does not do anything.
      ; The second is that as a command, there needs
      ; to be one space before the label we are
      ; sending Note Tab to.
      ^!Goto Loop

      ^!StatusClose
      ^!TOOLBAR New Document
      ^!InsertText ^%s% ^p
      ^!Save As "c:\WINDOWS\Desktop\pos_1-3_^$GetDate(yyyymmddhhnnss)$.txt"


      interval@... wrote:
      >
      > Dear NTrs,
      >
      > The clip below does only process the first line with in a selection
      > made with ^&.
      >
      > Why is that ?
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.