Jump to content
Macro Express Forums

Easy way to run macro number of times


buckley

Recommended Posts

Hello,

 

I am just starting the explore the power of Macro Express and I think that there are many possible answers to the question I am asking.

 

I have a few macros that I run from time to time and when I do they have to be run 5 to 10 times, each time differently.

 

I would expect to right click on the macro and say "Run x times" in addition to the the currently present "Run macro now"

 

Is the best may to introduce a repeat, so do a little programming?

 

Regards, Tom

Link to comment
Share on other sites

Hello,

 

I am just starting the explore the power of Macro Express and I think that there are many possible answers to the question I am asking.

 

I have a few macros that I run from time to time and when I do they have to be run 5 to 10 times, each time differently.

 

I would expect to right click on the macro and say "Run x times" in addition to the the currently present "Run macro now"

 

Is the best may to introduce a repeat, so do a little programming?

 

Regards, Tom

 

Tom,

 

You can simply use a Repeat command, with your macro called within the Repeat loop. Here's an example.

 

This is the command structure of a macro called Macro repeated:

// Run a macro mutiple times
Repeat Prompt Start (Prompt for repeat count at macro play time)
 Macro Run: Tom
Repeat End
Macro Return

 

And here is the actual code, which you can paste into an empty Direct Editor box if you want to create the macro yourself.

 

<REM2:Run a macro mutiple times><REP3:02:Center:Center:0001:0:00:><MACRUN2:Tom><ENDREP><MRETURN>

 

Run it with whatever activation you want.

 

For completness, here is the macro called Tom that I used:

 

// This is whatever macro you want to repeat
Text Box Display: Message
Delay 100 Milliseconds
Macro Return

 

And its code:

 

<REM2:This is whatever macro you want to repeat><TBOX4:T:4:CenterCenter000278000200:000:MessageThis text message has been opened by your repetitive macro. Instead of this command you would insert your own.

Press Enter or cllick OK to close this message.><MSD:100><MRETURN>

 

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Hey Terry,

 

What a fantastic idea... I had never considered putting a Macro Run command inside a Repeat Loop before. I generally

do the Macro Run and put the repeats inside the macro I'm running, but this is a different perspective that could have

immense benefits (such as when I want to call the same macro from another source that doesn't need to be repeated...).

 

I'm not sure I have any macros that would benefit from that right now, but it's definitely something I'm going to consider.

 

And this is why I hang out in the forum.

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.

Guest
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.

Loading...
×
×
  • Create New...