Cory Posted February 18, 2005 Report Share Posted February 18, 2005 I am a maladroit with this program so forgive me if I ask an ignorant question. I see there are many ways to control a repeat but I can not seem to find the simplest and most obvious control. I would like to enter into a loop and at the end have it prompt the user if they would like to repeat. I imagine a dialog box with a “Yes” and “No” button with the “Yes” highlighted by default so one could just hit the enter key to have it fire again. I see one can use a variable but how can I avoid having them type something in? Quote Link to comment Share on other sites More sharing options...
randallc Posted February 18, 2005 Report Share Posted February 18, 2005 Hi, Cory, Welcome! try this one for a start; no doubt many other ways! (Copy, Paste the code into script editor to see...) Repeat until %T10%="CANCEL" ....Variable Set %T10%="A" ....Multiple Choice Menu: Repeat Loop Prompt Repeat End (Note the tick box to cont macro with Cancel) Best, Randall <REP3:08:000001:000001:0010:0:01:CANCEL><TVAR2:10:01:A><MENU2:2:T:10:CenterCenter:Repeat Loop Promptpress Return to Repeat; else CancelRepeat?T><ENDREP><TBOX4:T:1:CenterCenter000278000200:000:Finished!Finished!> Quote Link to comment Share on other sites More sharing options...
Cory Posted May 24, 2005 Author Report Share Posted May 24, 2005 Thanks, that works fine. Seems kind of clunky an unintuitive to the user but it works. If anyone else has a way for me you have a simple way for me to see a "yes" (else exit) buttons I would appreciate it. Quote Link to comment Share on other sites More sharing options...
floyd Posted May 24, 2005 Report Share Posted May 24, 2005 In addition to Randall's solution, you could look into the If Message/Else/End If construct and use it in place of the Multiple Choice Menu command. Repeat Until %N1% <> %N1% Delay 1 Seconds If Message: "" Repeat Exit Else End If Repeat End <REP3:08:000002:000002:0001:1:01:N1><IDELAY:1><IFMESS3:00000:1:1: OKAY TO EXIT LOOP?Center:Center><EXITREP><ELSE><ENDIF><ENDREP> Quote Link to comment Share on other sites More sharing options...
Cory Posted May 25, 2005 Author Report Share Posted May 25, 2005 Very cool. "If Message". Hadn't tried that one yet. Thanks for answering so quickly! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.