How to use a variable in the REPEAT action

I see in the manual that you are indeed allowed to use a variable in place of a number when using the REPEAT action but when I do so, the field extends as it is expected to and there is a little "C" in the corner meaning it is looking for a calculation. So I still put in the variable,


that I want in place of a number but it says it is invalid. So how does one do this?

Macro attached.
Process SRT Fiels.kmmacros (8.6 KB)

What you’ve used is called a ‘text token’, but you need a calculation, so just use the variable name on its own: NumFiles

Have a look at the KM wiki manual about calculations: manual:Calculations [Keyboard Maestro Wiki]

1 Like

You need to understand the difference between Numeric Calculation fields and Text Token fields.

See: Text Fields

1 Like

Thank you tiffle.

1 Like