KM8: Bug Report - Calculation with Local Variable Fails

If I understand the new KM 8 Local Variables correctly, then I think we have a bug.

Running Keyboard Maestro 8.0 (8.0) on macOS 10.11.6.

@peternlewis, can you confirm?
Anyone else confirm?

Example Results


Macro: Local Variable Test KM8 @Test

Local Variable Test KM8 @Test.kmmacros (3.9 KB)

This, using "Local" instead of "𝕃":


works as expected for me:


However, the reason it's doing so seems to be because it is not being treated as a local variable, as "LocalVarTest" shows up in the Variables list in KM preferences and is both viewable and modifiable by a completely different macro:

So it does seem like either we're missing something about how to use local variables, or there are bugs afoot. (For the record, my test machine is a late 2014 27" 5K iMac running Sierra 10.12.6).

@gglick’s is not using local variables, because they must start with "Local " (including the space).

The ones with the double struck letters don’t work in calculations. I added them late, but they were a bad idea. Especially those characters since they are not even in the first unicode plane.

So I will scrap them. If people have alternative suggestions for the characters, let me know.

1 Like

Aha, I didn’t realize a space was needed after the “Local” prefix. That did the trick! If I may, I would suggest editing the manual/wiki entry to make it clearer that the space is required (I understand it’s there within the quotes now, but as I’ve aptly demonstrated, it’s very easy to just not see the space and type “Local” on your own).

As for characters to replace 𝕃 and 𝕀, I’m afraid I don’t have any suggestions at this point, but I’ll certainly let you know if anything strikes me.

1 Like

Easy to miss.

Please see my proposal.

This was fixed in Keyboard Maestro 8.0.2.
Thanks for the quick fix Peter.

Here's my revised Macro that confirms the fix:
Note that I renamed my Local Variables to have a prefix of "Local"

Example Results

###MACRO:   Local Variable Calculation Test KM8 @Test

~~~ VER: 1.0    2017-09-29 ~~~

####DOWNLOAD:
Local Variable Calculation Test KM8 @Test.kmmacros (3.8 KB)
Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.