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

Re: looping and exit

Expand Messages
  • abairheart
    Dave, Just forget about using SHIFT altogether. Use the Wizard s CANCEL button to exit early. Here is how I would do this: ^!Set %n%=0; %tracktitle%=Common
    Message 1 of 3 , Jan 9, 2007
      Dave,

      Just forget about using SHIFT altogether.
      Use the Wizard's CANCEL button to exit early.

      Here is how I would do this:

      ^!Set %n%=0; %tracktitle%=Common Title; %notracks%=30
      :START
      ^!Inc %n%
      ^!SetWizardTitle Enter Info for Track ^%n% of ^%tracktitle%
      ^!SetWizardLabel Press CANCEL to Quit
      ^!Set %temp%=^?{^%tracktitle% + subtitle=}
      ^!IfCancel DONE
      ^!Insert ^%n%=^%tracktitle%^%temp%^%nl%
      ^!If ^%n% < ^%notracks% START
      :DONE

      Changes made:
      (presets: N = 1 less than first track)
      Used Wizard title and lable as prompts
      Used a separate wizard line for clarity
      Used ^%nl% to insert EOL
      End of loop test "<=" changed to "<"
      ":EXIT" label changed to ":DONE"

      Note: You should NOT define labes with BUILT-IN identifiers.
      See Clip Script Help: Labels sub-section:

      H="Help with Lables"
      ^!Menu Help/Help on Clip Programming
      ^!Wait
      ^!Keyboard ALT+C &30 DOWN &30 DOWN &30 ENTER


      Abair


      > Hi
      > With the partial clip below it loops, the no. of tracks but you
      still have
      > to press shift at the end to exit, is the a way to on the last loop
      to exit
      > and not have to press shift ??
      >
      > :START
      > ^!INSERT ^%N%=^%tracktitle%^?{tracktitle=}
      > ^!Keyboard ENTER
      > ^!SetHintInfo PRESS Shift key to continue clip
      > ^!IfFalse ^$IsShiftKeyDown$ Skip_-1 ELSE NEXT
      > ^!SetHintInfo CONTINUING............
      > ^!INC %N%
      > ^!JUMP +1
      > ^!IF ^%N% <= ^%notracks% START
      > :EXIT
    Your message has been successfully submitted and would be delivered to recipients shortly.