How do I track the number of times a macro has run?
The short answer is to store the counter in a text file. The macro extracts the number from the text file and increments it by one when the macro is run. Below are the steps required and a description of what each step does.
1. Variable Set String %T1% from File: “increment.txt”
2. Variable Modify String: Convert %T1% to integer %N1%
3. Variable Modify Integer: Inc (%N1%)
4. Variable Modify Integer: Convert %N1% to text string %T1%
5. Variable Modify String: Save %T1% to Text File
Step one extracts the counter from the .txt file and saves it to a variable such as T1. The next step converts the variable to an Integer variable. Step 3 increments the value by one. The fourth step converts the value back to a text string variable. And the last step saves the new incremented value to the original text file.
So, each time the macro is run, the number saved to the text file is increased by one. Just open the text file at any time to see how many times the macro has been run.
– Applies to: Macro Express and Macro Express Pro