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

[Clip] Re: [NTB] Loop Question

Expand Messages
  • Raymond Fitzgerald
    Hi jleipold, (originally posted to Basic) ... inserting a ^p and the line of text above. ... I want the clip to end. You basically had it except for the goto
    Message 1 of 1 , May 6, 1999
    • 0 Attachment
      Hi jleipold,

      (originally posted to Basic)

      >Then I want to continue looking for <PS:repart> and continue the process of
      inserting a ^p and the line of text above.
      >I want the clip to loop until there are no more of the find criteria. Then
      I want the clip to end.

      You basically had it except for the goto and loop label. Except you may want
      to use ^!Jump LINE_END instead of ^!Keyboard END because of word wrapping.
      Be sure to check out all the ^!Find parameters in Help.

      H="Loop Question"
      ; for jleipold 050699/rayfitz
      ^!Jump DOC_START
      :LOOP
      ^!Find "<PS:repart>" IS
      ^!IfError End
      ^!Jump LINE_END
      ^!InsertText ^p[<FD:volnum><IX+>Vol. ^?[Enter Volume No.], No. ^?[Enter
      Issue No.]<IX></FD:volnum>, <FD:"issue date">^?[Enter Issue Date]</FD:"issue
      date">]
      ^!Goto Loop

      I couldn't tell if you want the user to input with each occurrence. If
      that's the case, then you need curly brackets:

      H="Loop Question2"
      ; for jleipold 050699/rayfitz
      ^!Jump DOC_START
      :LOOP
      ^!Find "<PS:repart>" IS
      ^!IfError End
      ^!Set %Col%=^$GetCol$
      ^!Inc %Col% 11
      ^!Set %Start%=^$GetRow$:^%Col%
      ^!Jump LINE_END
      ^!SelectTo ^%Start%
      ^!SetWizardLabel "^$GetSelection$"
      ^!Jump LINE_END
      ^!InsertText ^p[<FD:volnum><IX+>Vol. ^?{Enter Volume No.}, No. ^?{Enter
      Issue No.}<IX></FD:volnum>, <FD:"issue date">^?{Enter Issue Date}</FD:"issue
      date">]
      ^!Goto Loop

      Here's an alternative to the above. Instead of using wizard labels, it
      highlights the text. So you need to set variables before the selection goes
      away:

      H="Loop Question3"
      ; for jleipold 050699/rayfitz
      ^!Jump DOC_START
      :LOOP
      ^!Find "<PS:repart>" IS
      ^!IfError End
      ^!Set %Col%=^$GetCol$
      ^!Inc %Col% 11
      ^!Set %Start%=^$GetRow$:^%Col%
      ^!Jump LINE_END
      ^!SelectTo ^%Start%
      ^!Set %Vol%=^?{Enter Volume No.}; %IssNr%=^?{Enter Issue No.};
      %IssDt%=^?{Enter Issue Date}
      ^!Jump LINE_END
      ^!InsertText ^p[<FD:volnum><IX+>Vol. ^%Vol%, No. ^%IssNr%<IX></FD:volnum>,
      <FD:"issue date">^%IssDt%</FD:"issue date">]
      ^!Goto Loop

      Cheers,
      Ray Fitz

      ------------------------------------------------------------------------
      eGroup home: http://www.eGroups.com/group/ntb-clips
      http://www.eGroups.com - Simplifying group communications
    Your message has been successfully submitted and would be delivered to recipients shortly.