UPDATE: Help needed improving my "Toggle Edit Mode" Macro for KM-Editor

Okay I understand - that's explaining why I get that Error Message.

Thanks a lot @peternlewis.

Maybe you could help me improving my macro? Or maybe you @JMichaelTX?
When I made it I was searching for a quick and simple way to enable/disable the Edit Mode. But as you can see above it will take a very long time to occur - and as I said before it often doesn't ...
My Plan to improve it is to figure out whether the Group-, Macro- or Actions-Area is selected (enabled Edit Mode) and then it should select Group-Area before disabling the Edit Mode or just disable it if the Group-Area is already selected. Maybe there have to be 1 or 2 AppleSripts for checking? - I am asking because I really don't know how to set that up....

That would be nice....

Thank you for your time

Greetings from Germany