I do "/window -c @blah" all the time, the command does not error when the window is not present, and it allows me to set new parameters for the window in the next /window

Well if u cover for all posabilities then ill give you that your alias well work and now your having to monitor debug as well, but you again still cant catch !window or !debug, and i have answered why the coder may do this, basicly becuase the person wanting to intercept the open window event isnt the coder, but someone else. The original request was for how to code for an event, well if there is no "on event" & u cant trap all of the occurances of the event with an alias, your down to only one thing that I know a timer to monitor the situation, and report back or take action as needed.

My solution is by no means fool proof, its only checking once a second, if i wanted to take actions beyond just playing a sound, i would have to monitor a lot closer than that, and even then, a whole script well be run before my timer gets another chance to have a look at whats happened, and as well all know, a script can run for a long long time.