Jump to content
Macro Express Forums

Repeat counter?


Recommended Posts

Incrementing a counter each time through a loop is easy; just store the counter to a variable. Displaying the count is trickier because a text box cannot be "refreshed". You can, however, Use the Text Box Close command just prior to popping up a new text box. To avoid screen flicker, use the close command after popping up a new text box with a new variable. This works because Macro Express will close the first text box opened with identical, or empty, captions and not the last one.

Link to comment
Share on other sites

  • 2 months later...
Is there a way to make a repeat counter to count the interations of repeats during a macro running? Perhaps via a popup message box?


I know I'm two months late with my post, so you've probably worked out a solution. But here's my version of how to do what it is I believe you're trying to do:


<IVAR2:01:01:0><REP3:08:000002:000001:0001:1:01:T1><REM2:Enter Your Code Here><NMVAR:01:01:1:0000001:2:0000001><ENDREP><TBOX4:T:1:CenterCenter000278000200:000:%N1% = number of times the macro repeatedThis repeated %N1% times.>

Link to comment
Share on other sites

I find that if it's a long process that the constant closing and opening (trick: do the close before the open) will slow things down and or steal focus from other things you're trying to do. I usually calculate a percentage done, in fact I have a subroutine to do it, and update the box every 1% or sometimes 5%. In the beginning I would tell the user X/Y records where X was the current and Y was the total but when processing 3600 iterations this will slow the macro down a lot. Also I have a trick I use once in a while where the close/open part of the repeat is conditional depending on whether the box is on top. This way it won't attempt to do the close/open if I'm working on something else. If I then want to see how it's coming I highlight the box again and the next update will give me the current progress.

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