Lets say there are 3 macros running each macro signals teh flag on. Easy so far.
NOW macro 2 ends . HOW does it know that a macro is still running and to NOT turn off teh flag.
NEXT , macro 3 ends. Same problem
Next finally Macro1 ends how will it know it is teh last macro running and to turn off teh flag??
Maybe use a table or list and each macro adds its name to teh list and when it ends remove its name from teh list. Then each macro when it ends checks teh list to see if it is teh last macro running then turns off teh flag.
You're assuming that any macro should block all other macros. I wouldn't expect that to be the case when you factor in thousands of users with different needs. They could add a single flag that meets your needs, but not someone else's.
At some point in time UCCNC has to provide a way for macro writters to able to identify when a possble confict may occur and be able to at LEAST warn users of it.
That's just not going to be possible. How is every macro, every macroloop, every plugin, and every screen going to be checked for conflicts with each other. If a user wants to use the power they are given, they have to be responsiblefor whatever may occur.