TsunamiZ Posted September 25, 2007 Report Share Posted September 25, 2007 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? Quote Link to comment Share on other sites More sharing options...
floyd Posted September 25, 2007 Report Share Posted September 25, 2007 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. Quote Link to comment Share on other sites More sharing options...
blopib Posted October 2, 2007 Report Share Posted October 2, 2007 Hi This is how i do it. Variable Set Integer %N1% from Prompt Repeat with Variable using %N1% Text Box Display: Remaining loops // Put you're code here Text Box Close: Remaining loops Variable Modify Integer: %N1% = %N1% - 1 Repeat End Quote Link to comment Share on other sites More sharing options...
stevecasper Posted December 2, 2007 Report Share Posted December 2, 2007 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.> Quote Link to comment Share on other sites More sharing options...
Cory Posted December 4, 2007 Report Share Posted December 4, 2007 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. 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.