Math with KM


#1

Hello!

How to do Math with KM (subtraction, multiplication, etc... ) ?

var1 contains 0.12345567 and var2 contains 1.1234565

How to subtract var2 from var1?

Thanks in advance


#2

Since you'll presumably want to be doing something with the result of a calculation, even if it's just displaying it so you know what it is, I'd say the go-to method would be to set a variable to a calculation (key action in yellow):

Example Macro.kmmacros (2.7 KB)
image

Further reading: https://wiki.keyboardmaestro.com/manual/Calculations


#3

Gabe, thanks for a fast reply!

It does the work!