I could add a $dqwindow identifier that is only accessible in the on TEXT/ACTION events and returns: 1 if the message window is about to be opened and written to, or 2 if the message window is already open and is about to be written to. It returns 0 in all other cases. Would that help?