Jump to content
Macro Express Forums
nuggles

How to set macro to repeat X number of times

Recommended Posts

hello everyone,

 

i have a macro that i would like to automatically repeat itself upon comletion of its duties. is there an option in the editor that i am missing for this?

ideally i would like to be able to set it once, for example, to repeat 10 times. from then on whenever i activate, it will repeat 10 times

 

on a separate note, i suppose it might also prove useful, when implemented, to be prompted upon activation for how many times if any, i want my macro to repeat

 

much thanks

Share this post


Link to post
Share on other sites
hello everyone,

 

i have a macro that i would like to automatically repeat itself upon comletion of its duties. is there an option in the editor that i am missing for this?

ideally i would like to be able to set it once, for example, to repeat 10 times. from then on whenever i activate, it will repeat 10 times

 

on a separate note, i suppose it might also prove useful, when implemented, to be prompted upon activation for how many times if any, i want my macro to repeat

 

much thanks

 

Just place your macro inside a Repeat loop.

 

Unfortunately, due to the bug I reported in this thread, you can't prompt in the obvious way at present, in a Repeat Start command. Pending the fix, you could do it with an extra command like this:

 

Variable Set Integer %N[1]%: Prompt

Repeat Start (Repeat %N[1]% times)

// Place your Macro Run command here

Text Box Display: This message every time the macro runs

End Repeat

 

<VARIABLE SET INTEGER Option="\x01" Destination="%N[1]%" Prompt="How many times do you want to repeat?" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0"/>
<REPEAT START Start="1" Step="1" Count="%N[1]%" Save="FALSE"/>
<COMMENT Value="Place your Macro Run command here"/>
<TEXT BOX DISPLAY Title="This message every time the macro runs" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 Your macro has just been run.\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/>
<END REPEAT/>

 

--

Terry, East Grinstead, UK

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×