Hello,
Many Thanks for your help, I have now switched not only this one macro but also many other macros from "If Then Else" to "Switch/Case," and I’m quite satisfied because the macros have become much more compact and smaller as a result. However, I still have the problem that, in cases where one macro needs to trigger another, the 50 macros limit is repeatedly reached, and my interface stops working.
I’ve read a lot in the forum about this issue and the corresponding message, but I can’t find a solution to prevent it in my case.
All my macros consist of "Prompt with List" actions, where I have to select an entry. For some entries, a new macro will be triggered, while for others, actions are executed within the same macro.
I’m attaching five macros to show how I’ve built them. By now, I understand that something about this setup must be wrong, but I can’t figure out the correct solution.
Specifically, my concern is about the "Execute a Macro" actions within a "Repeat" action. And there are many cases like this. Even the "Main Menu" macro is a "Repeat" action. If I select the entry "Header" from the list, I want the "Header" macro to be executed, and the "Main Menu" macro to be canceled immediately. That’s why I built it this way and thought it would work:
Execute Macro "Main Menu"
Pause for 0.1 Sec
Cancel this Macro.
But it doesn’t work, and I also understand why it doesn’t work. The "Header" macro is executed and shows its first action. However, the actions of the "Main Menu" macro, such as the pause and "Cancel this Macro," are not executed even though the macro should still be running.
And when I return from the "Header" list to the "Main Menu," a new instance of the macro is executed, but the "Header" macro is still running. As a result, more macros are now active than I want.
I really want that, whenever a new macro is executed, the previous macro is canceled. Could you please help me and provide tips on how I can restructure the macros? I don’t want to change the setting that limits the 50 macros.
And I don't want to have all in one macro, because it would be very large and I want to have several keyboard shortcuts to enter this interface.
Thank you very much!
Ronny
VPS Avenger Control Snippet.kmmacros (528.1 KB)