How Can We Help?
< All Topics

Incrementing variable values

I wish to fill out forms on the Internet. One variable on the form must change every time it is submitted. Could the macro generate this change (which is basically an ascending numerical change – e.g. 0001, 0002, 0003 etc. – in one of the variables)?

I see two alternatives here:

  1. I’m not sure if you are after this, but if the macro were run in a repeat loop, you could use the repeat counter in a variable.

  2. If you are running the macro each time and want to use a new number each time the macro is run, then I think you can do the following: Have your starting value stored in a text file. Issue a Text File to Text variable command to get the value. Do what you want with it (you may need to convert it to an integer variable first). When you are all done, convert it to an integer variable (if you haven’t already). Increment the integer variable. Convert it back to a text variable. Paste the text variable to the clipboard. Issue a Clipboard To File command and save it back out as the original file name. Next time you run the macro it should pick up the incremented value.

– Applies to: Macro Express and Macro Express Pro