toralf wrote:My problem was, that I assumed that even if GUI,New would create a unnamed GUI the GUI would still have a number.
I'll add "and unnumbered" somewhere. Currently a GUI number is internally just a name, and is also used in exactly the same way, though numbers outside the range 1..99 are assumed to be HWNDs.
Looking at it another way, unnamed GUIs
are numbered, but the number is generated automatically by the OS. You use the HWND in the same way that you use 1..99, and it is even returned by A_Gui in place of a name or number. The only difference is that if you make a number 1..99 the default and then destroy the GUI, that number remains the default, whereas if the GUI has only a HWND, the HWND becomes invalid and so the default reverts to 1.