Thanks Vincent,
That's defnitely another direction to explore.
Your sample macro brings up what may be a BUG, which is probably a question for @peternlewis:
In your image above, when you have picked "Available when a focused window title matches:", the text field does not show a [T] icon at the far left, and yet you are successfully using the NamedClipboard Token. If Tokens work, then Variables should also work.
Which brings up another issue about this whole process, whether it's a variable or named clipboard or whatever, that I think I'd also like to ask @peternlewis, is how it works in terms of timing. When you open a window, or when you change focus to an existing window, first KBM sees that Brave, Safari, or Chrome is open, then it sees that the window title matches your Clipboard, so the macro group is activated. But what if you're already in that window and the clipboard changes? There's nothing to trigger KBM to notice and check, so you're on the right page but the macros aren't active until you change pages and return. Or are they? I'm guessing here. @peternlewis ??
As for my actual programming goal, I'm still trying to work out the overall "architecture" of a bunch of interconnected macros, and this was one way I came up with to have one set of macros to maintain while being able to change the triggers. I don't really know yet whether I will need to change triggers "on the fly" or whether I can change the macro code occasionally, when I need to.
Or maybe the RegEx solution will work and I simple have the macros active in multiple, narrowly defined situations, all at the same time. I do know that I don't, for instance, want them active in all Finder windows.
But I don't yet know whether I want them to be active in window AAA but not the others, and then active in window BBB, but not the others, including not active in AAA., or whether it would be desired vs. tolerable to have them active in AAA, BBB, CCC, and DDD all at the same time, since only one of those windows can be foremost. That distincion I don't know about yet and probably won't know until I'm using it. I guess I'll try coding whatever seems easiest (all active via RegEx) and then see if I have to change it.
Again, Thanks Vincent, for thinking about my problem and sharing your macro.