I've been doing some testing of how to pass parameters from Swift to AppleScript to Keyboard Maestro.
Starting at the KBM end, I created a macro called "Hello World". When I select that it is to be triggered by an AppleScript, KBM provides some variations on the the syntax to use AppleScript. Here's mine:
do script "Hello World" with parameter "Whatever"
I want to print "Hello, World!" and follow it with a note about whatever "Whatever" is. In my test, I'm using the literal string, "Whatever".
I remembered from recent reading about parameters that what I wanted was
TriggerValue, but I couldn't at that moment remember the Token Syntax, single percent signs, double percent signs, or what. No worries, I'll just find it in the Token Menu.
But it wasn't there! In the Display Text action, the Insert Token dropdown menu does not include that token in its list. The list jumps from
Tripped... without listing
These dropdowns and other user hints are an invaluable part of Keyboard Maestro. They really help me to keep moving on writing what I want to do rather than having to constantly refer to the doc to be reminded of both names and syntax.
TriggerValue was in that list, I could just click it and it would be inserted in the proper syntax and I could move on with my testing.
I didn't even notice that there is something called "Tripped Trigger Value". It didn't start with T-r-i-g-g so it wasn't of interest.
It wasn't until I started writing this "bug report", in the process of creating the screen capture, that I saw "Tripped Trigger Value". I'd never heard of any tokens starting with "Tripped", so I tried it. Well what do you know? That seemed the long way 'round the barn to find out that what I wanted ws already there.
It's useful to have items in the list by meaning. It's also useful to have items in the list by exact name.
If the description of a token is different from the name of the token, can we have both, please?