When I open a palette, it helps me if I can trigger my most used macro (of this palette) with the same shortcut I use for the palette.
⌥+a+a opens the palette, triggers the macro with the shortcut ⌥+a and closes the palette.
(Explanation: ⌥+a opens the palette and additionally a macro of the palette is triggered with ⌥+a. This must work without conflict. I know that I could trigger the palette macro with "a" only, but ⌥a+a feels more natural.)
For this, my simple macro works. What doesn't work, unfortunately:
If I only press ⌥+a, the palette should stay open. I have not been able to do this with "If Then Else".
Does not work how? I only put in what you should do as comments, have you replaced them with the actual actions you want to take in each branch of the "If... Then... Else"?
I should have been more clear about that -- but it's quite difficult to include proper actions to show/hide palettes and/or trigger macros when you have neither the palettes or macros on your own machine!
Where I've got the comment "Palette open -- Execute Macro", drop in your action that executes the macro you want to run on the second press of ⌥A. Follow that with a "Hide Palette" action if necessary.
Where I left the comment "Palette not open -- Show Palette", drop in your "Show Macro Group Palette" action.
Thanks @noisneil. This works more or less as I wanted. However, the shortcut (⌥+a) of the most used macro on the palette must be disabled, otherwise a conflict palette appears. This means that if the palette is already open, this macro cannot be triggered with the shortcut. Maybe this could be solved by switching the macro groups on and off somewhere... or maybe not
But you know what, I found a very simple solution with KM and BTT.
The first ⌥+a opens the KM palette with BTT.
The second ⌥+a triggers the macro of the KM palette with KM.
The second ⌥+a (trigger for the palette macro), however, is not passed to KM because BTT apparently operates at a lower level (⌥+a is already occupied by BTT to open the palette). So I deacativate BTT for 0.2 s (after opening the palette), the shortcut is passed to KM and BTT reactivates itself automatically. This all takes place in the background without you noticing anything.
You may think that's complicated. For me it's the other way around. This way I understand exactly what I am doing. Totally opposite to a KM macro that might work (if you put in another 15 hours of work ), but I have no idea how to build it.
Once again KM and BTT have proven to be a good team. Thanks again @noisneil & @Nige_S . I might be too stupid for KM alone, but I almost always find a way with the "Duo Infernale".
This is my variant. It works -- once. For some reason, hiding the palette deactivates the Macro Group even though "Always activated." remains selected -- you have to select another option then reset to "Always activated" to make it work again.