(Not a) Bug in Plugin Actions with Menu the Only Parameter

@peternlewis -

I believe I've found a bug with Plugins - it appears to only happen when there's only a Menu type of parameter. I could be wrong about that.

The following plugin and macros will demonstrate the bug.

Show Menu Parameter.zip (7.8 KB)

Show Menu Parameter Test.kmmacros (2.2 KB)

  1. Make sure Mail is running.
  2. Pick a menu item from the "Parameter" drop-down.
  3. Alt+Tab to Mail.
  4. A Notification will display showing the parameter.
  5. Switch back to the KM editor, and pick another menu item.
  6. Switch back to mail.
  7. At some point (after just a handful of tries), the notification won't display the new parameter - it will display the old parameter. You have to switch back and forth a couple of times before it shows the new value.

Let me know if you need more info. Thanks.

Not obviously seeing that here - perhaps a just notification lag/issue ?

(the earlier notification window hasn’t yet gone, or is not successfully refreshed ?)

Oh man, this is interesting. I think I already have my answer, just from pondering your response and trying a few things, but if you can try something for me, it would help.

By the way, it has nothing to do with notifications - I was just using that to show the issue.

So, here’s how to show it. Change the menu item in KM then immediately switch to mail. Chances are it will show the old menu item.

If it doesn’t, wait for the notification message to go away (so there’s no confusion), switch back to KM and try it again. Don’t wait long at all between when you change the menu item and you switch to mail. Use Alt+Tab or whatever works on your system.

Assuming this shows the issue, I think you’ll be able to deduce what’s going on, and it will confirm my theory. I hope.


@peternlewis I think I know what the issue is, and if I’m correct, it’s probably by design, not a bug (and I’m OK with it, if you care :slight_smile:.)

Is it possible that when I pick a menu item, it doesn’t get “posted” for a second or two? It seems like if I pick a menu item and immediately alt+tab to the mail app, the selected menu item isn’t used. But if I wait for a second or two before switching to Mail, then it appears to use the new value.

Sound possible?


Whenever you make any change to macros in the editor, there is a short delay before the change takes effect.

Part of it is that multiple changes are coalesced into a single write to disk. You can see this by observing the subtle grey diamond in the bottom right corner of the editor window - when you make a chance, it will show up, and when the macros are saved, it will disappear.

If you just put your cursor in a macro name field, and simply start typing “x” over and over again at about half second intervals, you will see the diamond shows up and stays there while you continue typing. When you stop, then the macros will be saved.

Even after that there is a small delay for the engine to be notified of the change and to read in the new macros and for the changes to be “live”.

Let me know if you believe there is any other issue going on.

1 Like

Nope, that is exactly what I was experiencing. I thought it was a bug because (it turns out), I kept testing it the same way - with very little time between making the change and trying it out.

I actually feel a little silly about it now. The boy who cried wolf. Ah, live and (unfortunately) rarely learn my lesson.

Thanks again, and I think how it works is just fine.

Not at all, it is perfectly understandable. Your expectation is exactly how you should expect Keyboard Maestro to work - it's just realities and technicalities require slightly less perfect behaviour which in this case is noticeable.

1 Like