Jump to content
Macro Express Forums

Running A Macro Repeatedly


Recommended Posts

Earlier I asked about handling exceptions, but I guess that was a question without an answer. I may now have the answer, but the answer has generated another question.


I have a macro that needs to poll data from about 100 retailers. If the process fails on retailer 99, the macro would start with retailer 1 on the next run. So now I think I might operate it this way:


A scheduled macro creates a text file containing the number 1.


A second scheduled macro opens the file that contains 1 and stores that to a variable.

The macro then opens a CSV file with information about all 100 retailers.

The macro processes the information for the first retailer.

Before stopping, the macro updates the file with the counter to 2.

As soon as the second macro finishes, I want it to start again on the next iteration.


There must be an easy way to do this, but I don't see it.


Hoping this third question is the one that will attract an answer .... Thanks!

Link to comment
Share on other sites

In the folder where the Macro Express program files are installed there is a macro file names Samples.mex. In this macro file there is a macro named Counter from Run to Run. This demonstrates storing a numeric value when the macro runs and reading that numeric value the next time it runs. Use this as an example. Use the variable in the 'Start Processing Record' field of the ASCII File Begin Process command.

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