Combine calculate and variables in text fields

Peter has given a nice intro to text fields and calculation fields. However I can’t seem to make a combination of calculation and text variables work. Let’s say I want to add 1 to a variable which includes a number, say 9, it doesn’t work and instead prints garbage.


The above prints:


I assume this is because KM is not Python. However I couldn’t find anything on how to cast a string as an integer (or something similar). Any help would be appreciated.

Like this:


@Tom gave you the solution.

I have updated the Wiki to make it more clear:

token:Calculate [Keyboard Maestro Wiki]

1 Like