the major problem with that is in getting the window handle.
you use window names for the simply fact that when a window is created you cant specify a window handle but you can specify a window name.
/window @blah
In that construct theres no way to know what the window handle is as its assigned by windows (the OS) itself. You could in turn use $window(@blah).hWnd but that just seems like more work for each window opened.
For windows such as channels and query's i dont see such a large issue (maybe more so with quuery's) since hte channel windows name wont change at all.
For custom windows the name may never change or it may but thats entirely up to you and your script so if the name is at all unreliable then its pretty much your doing.
Of course you could write your own alias such as /CreateWindow that when used as an identifier returns the window handle and then another alias to loop thruogh all windows and return the name of the matching handle (for calls in other window related aliases events etc..) but i think that would just be extra steps that really isnt needed.
I like the idea however for non mIRC related windows. For example if you had a window handle to a listbox it would be nice to be able to use it in a /aline or some other list related commands.
P.S
alias activehwnd return $window($active).hwnd
Im not usually one for the "You can script it" excuse but in this case i dont think its all that much (a few words in remotes?)
Have Fun