How to Change the Number of Times a Repeat Action Iterates Every Time The Macro is Run

I want to change the number of repeat macros each time.

I am using the repeat macro and want to change the number of times it repeats each time. When I start the macro, it asks, "How many times do you want to repeat?" and enter the number of times to repeat.

I want it to repeat that number of times – is this possible?

I have checked the past forums and came up with the hypothesis that it might be possible by using the macro "Prompt for user input" and the macro "Repeat Action Count Times", however I can't find the "Repeat Action Count Times" macro in the list.

Is my hypothesis wrong? If there is a better way, could you please let me know?

I found someone who uploaded a macro using "Repeat Action Count Times" and imported it and it appears fine. Why doesn't it appear in my action list?

This is easy
Just take”number of repeats” and put it in the feild that belongs to repeat action

1 Like

You're quite right -- you can "Prompt for User Input", save the answer to a variable, then use the variable as the value in the "Repeat" action's "times" field (that is a number field so you can use a number, a calculation, or a variable containing a number).

Repeat Test.kmmacros (3.6 KB)


You should really check that the user has entered a number -- I believe that's called "an exercise for the reader" :wink:

Many actions are listed by their "basic name", but their "display name" in a macro can change depending on the options chosen -- this is both very useful, but also very confusing when looking for something. You'll find what you want as "Repeat" in the Action List.


Sorry for the delay in responding.
Thanks for the advice.
I tested it based on the file you attached and it worked.
It is exactly what I wanted to do.

But I still don't fully understand it.
Please forgive my lack of understanding.

I don't know how to make the "Repeat Action" macro display "Execute these actions".
I feel like I don't know something very rudimentary.

Please give me a chance.

I don't understand myself well enough.

In user input leave it empty don’t put 1 there

But you have it correctly

So when asked you put the number in user input and it Repeats it “local repeat” number of time

1 Like

Thank you very much.
Resolved. I had assumed that only numbers could be entered.

It's a bit hidden -- unlike other fields, which show their "type" with a small T (text), C (calculation), or V (variable) at their top-right as soon as you click in them:

..."spinners" don't reveal their C until you type in a non-number:

As a "Calculation", or numeric, field you can put in anything that will resolve to a number -- a variable, a function, a calculation, or as complex a combination of those as you need.


Thank you very much.
I learned something very meaningful.