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

Re:[Clip] clip help

Expand Messages
  • Elizabeth Wild
    Dave, Here is what I would do -- In place of the ^!Inc command I would use ^!Set %N%=^$Calc(^%N%=1)$. I would set it up this way simply because I can never
    Message 1 of 3 , Dec 1, 2000
    • 0 Attachment
      Dave,

      Here is what I would do --

      In place of the ^!Inc command I would use ^!Set %N%=^$Calc(^%N%=1)$. I would set it up this way simply because I can never get ^!Inc to work the way I want it
      to (probably because I don't really understand what it is supposed to do).

      Well that's my 2 cents on how to handle this.

      Elizabeth

      Original message from: David McIntosh
      >Hi list
      >Trying to make clip to make the format below could not work out how to
      >include [ 0 ] in the Inc. command???
      >
      >artist=Abraxas Pool
      >title=Abraxas Pool
      >numtracks=4
      >0=Boom Ba Ta Ya
      >1=A Million Miles Away
      >2=Baila Mi Cha Cha
      >3=Waiting For You
      >
      >the no. of tracks can vary.
      >
      >H="Track & count"
      >
      >^!SET %ROWT%=^$GETROW$
      >^!KEYBOARD CTRL+END
      >^!SET %ROWB%=^$GETROW$
      >^!SET %trackCount%=^$calc(^%ROWB% - ^%ROWT%)$
      >^!SET %N%=1
      >^!SetCursor ^%ROWT%:1
      >Artist=^?[Artist]
      >Title=^?[Title]
      >numtracks=^?[No.Tracks]
      >0=
      >:START
      >^!Jump LINE_START
      >^!INSERT ^%N%=
      >^!INC %N%
      >^!JUMP +1
      >^!IF ^%N% <= ^%trackCount% START
      >
      > THANKYOU DAVE
      >
      >
      >
      >
    • Gauffin Claes
      Hello Dave, I am not quite sure what you are trying to do. The clip I have appended works in a fashion. I commented out your numtracks query since it seemed to
      Message 2 of 3 , Dec 1, 2000
      • 0 Attachment
        Hello Dave,
        I am not quite sure what you are trying to do.
        The clip I have appended works in a fashion.
        I commented out your numtracks query since it seemed to me you have it in
        the %trackCount%
        variable already. But then I may have misunderstood

        Regards /Claes

        H="Track & count"
        ^!SET %ROWT%=^$GETROW$
        ^!KEYBOARD CTRL+END
        ^!SET %ROWB%=^$GETROW$
        ^!SET %trackCount%=^$calc(^%ROWB% - ^%ROWT%)$
        ^!SET %N%=0
        ^!SetCursor ^%ROWT%:1
        ^!inserttext
        Artist=^?[Artist]^%nl%Title=^?[Title]^%nl%numtracks=^%trackCount%^%nl%
        ;numtracks=^?[No.Tracks]
        :START
        ^!Jump LINE_START
        ^!INSERT ^%N%=
        ^!INC %N%
        ^!JUMP +1
        ^!IF ^%N% < ^%trackCount% START

        >
        > Hi list
        > Trying to make clip to make the format below could not work out how to
        > include [ 0 ] in the Inc. command???
        >
        > artist=Abraxas Pool
        > title=Abraxas Pool
        > numtracks=4
        > 0=Boom Ba Ta Ya
        > 1=A Million Miles Away
        > 2=Baila Mi Cha Cha
        > 3=Waiting For You
        >
        > the no. of tracks can vary.
        >
        > H="Track & count"
        >
        > ^!SET %ROWT%=^$GETROW$
        > ^!KEYBOARD CTRL+END
        > ^!SET %ROWB%=^$GETROW$
        > ^!SET %trackCount%=^$calc(^%ROWB% - ^%ROWT%)$
        > ^!SET %N%=1
        > ^!SetCursor ^%ROWT%:1
        > Artist=^?[Artist]
        > Title=^?[Title]
        > numtracks=^?[No.Tracks]
        > 0=
        > :START
        > ^!Jump LINE_START
        > ^!INSERT ^%N%=
        > ^!INC %N%
        > ^!JUMP +1
        > ^!IF ^%N% <= ^%trackCount% START
        >
      • Jody
        Hi Elizabeth, ... ^!Inc simply increments by one by default. You first set the variable to some number, usually one or zero and then in a loop somewhere
        Message 3 of 3 , Dec 1, 2000
        • 0 Attachment
          Hi Elizabeth,

          >In place of the ^!Inc command I would use ^!Set
          >%N%=^$Calc(^%N%=1)$. I would set it up this way simply because I
          >can never get ^!Inc to work the way I want it to (probably
          >because I don't really understand what it is supposed to do).

          ^!Inc simply increments by one by default. You first set the
          variable to some number, usually one or zero and then in a loop
          somewhere (normally) you increment the variable.

          H=Inc Demo
          ^!Set %n%=0
          :Loop
          ^!Inc %n%
          ^!Continue ^%n%
          ^!Goto Loop

          This is from Help:

          ^!Inc VariableName [nn]

          Adds 1 to specified variable (increment). If you use the second
          optional parameter "nn", you can specify a different increment
          value. For example, if %var% contains the value 23 and you apply
          the command "^!Inc %var% 7" to it, the new value will be 30.

          So...

          H=Inc Demo nn
          ^!Set %n%=0
          :Loop
          ^!Inc %n% ^?[Increment by=5]
          ^!Continue ^%n%
          ^!Goto Loop

          Normally you would have a line in the Clip telling NoteTab when
          to stop the loop else it would just keep looping unless you use a
          prompt like above.

          H=Inc Demo Until
          ^!Toolbar New Document
          ^!Set %n%=0
          :Loop
          ^!Inc %n%
          ^!InsertText ^%n%^p
          ^!If ^%n% = ^?[Stop at what number=10] Next else Loop
          ^!Skip Trash document?
          ^!Goto End
          ^!Close Discard

          ^!Dec is just the opposite.

          Happy Clip'n!
          Jody

          http://www.notetab.net

          Subscribe, UnSubscribe, Options
          mailto:Ntb-Clips-Subscribe@...
          mailto:Ntb-Clips-UnSubscribe@...
          http://www.egroups.com/group/ntb-clips
        Your message has been successfully submitted and would be delivered to recipients shortly.