I am looking for a function in Keyboard Maestro that, upon triggering a macro, provides me with a number ranging from 1 to 5.
The first time I trigger the macro, it should give me 1 and store this number in a variable called "Counter."
The second time I trigger the macro, it should give me 2 and store this number in the "Counter" variable.
For each subsequent trigger of the macro (3rd, 4th, and so on), it should give me the corresponding number (3, 4, and so on) and update the "Counter" variable accordingly.
This sequence should continue until the 5th trigger of the macro, where it will give me 5 and update the "Counter" variable accordingly.
After reaching 5, the sequence should reset, and triggering the macro again should give me 1.