Jump to content
Macro Express Forums

Simple Repeat Control


Recommended Posts

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?

Link to comment
Share on other sites

Hi, Cory,




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!>

Link to comment
Share on other sites

  • 3 months later...

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.

Link to comment
Share on other sites

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
 End If
Repeat End

                              OKAY TO EXIT LOOP?Center:Center><EXITREP><ELSE><ENDIF><ENDREP>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...