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

23964Re: [Clip] Simple loop question

Expand Messages
  • loro
    Aug 29, 2013
      At 21:36 2013-08-27, you wrote:
      >How do I create a simple loop that can be repeated by a variable number input?
      >For example I want to create a clip that can write "Hello World" and
      >I want to input how many times I want it repeated?

      Like this?

      ^!Set %repeat%=^?{How many times?}

      ^!Set %cntr%=0
      ^!Inc %cntr%
      ^!If ^%cntr% > ^%repeat% end
      ^!InsertText Hello world^P
      ^!Goto loop

      That is you need a label (I called it 'loop', but you can call it
      anything). At the end of the clip you need to tell it to go to this
      label so the loop starts over.
      You need a counter (the variable called 'cntr') to keep track of how
      many times the loop has run. You do that by increasing it with 1 for each loop.
      You need a conditional to check if the loop has run as many times as
      you want and if it has kill the clip (the ^!If line).

    • Show all 6 messages in this topic