How to create an if else calculation?

Hey Simon.

When posting macro and/or action graphics to the forum please take a second and narrow down the width of the action pane in the Keyboard Maestro Editor, so there’s not so much waste in the posted image. (I’ve edited the posted image this time.)

I had this sitting ready to post, so despite JM’s coverage I’m going to post it anyway.

You’re misunderstanding the different types of fields in Keyboard Maestro.

A calculation field will take a bare variable name without the “%” delimiter.

For that matter a delimited variable name (for use in a text-field) must have this format:

%Variable%YourVariableName%

So. Your first calculation field should look like this:

saturationfunction > 40

The next set variable to calculation should be:

(saturationfunction/10) * 40

Your next action is Set Variable to Text NOT a calculation. If you want to do a calculation in a text field you have to do it like this:

%Calculate%var * 10%

See menu: Edit > Insert Token > Calculation

As far as I’m aware you cannot dump the %CurrentClipboard% token directly into a text-field calculation – nor can you use it directly in a calculation field.

You have to get the %CurrentClipboard% to a variable and then use the variable name in your calculations.

-Chris