@peternlewis I'm not sure I've ever actually officially requested this or not. I know we've talked about it before, but it keeps coming up for me regularly.
I'd like to be able to have a Custom HTML Prompt that acts like a "real" window. In other words, you can use ⌘⇥ and see it like other windows. It can have an icon in the task bar. It shows up in Mission Control/Spaces. Those kinds of things.
I know it's kind-of esoteric, but I'll bet if it were available, you'd start to see people use it regularly.
I know it's not simple, but I figure if it's in your brain somewhere, your typical brilliance will figure out a way. I mean, you figured out how to do Local and Instance variables, so you can do anything!
In macOS Sonoma, you can create "Web Apps". These are "user created apps" which act like "real window apps" and support Tabs, etc. Have you tried using this feature to create a "web app" from a local file on your computer, such as "Localhost://somefilename"? Your macro could create the file, then use Safari to create the Web App, then launch the web app.
I guess I'll go figure it out then. I thought you would love trying this because HTML is your bailiwick.
I just tried it. When you try to use the "File / Add to Dock..." feature in Safari for a "file://", the "Add to Dock" menu item is greyed out. This is probably a limitation of Safari, for some stupid reason.
However it still might be possible to fix this, at least for some users. Isn't it possible to set up a web server in macOS now? The "Add to Dock" feature might work in that case. That seems like overkill to solve a problem as simple as yours, but if you are the only user of your macros, it might be sufficient for your needs.
I don't think it can be, because it would have to be a Keyboard Maestro Engine window, and I'm not sure that would work if it is not some sort of panel.
Have you considered the custom panel editor in System Preferences? It has a way to create pages, which are focussable, and you should be able to activate them (and close them) from KM. And best of all, they should be compatible with your antique iMac.