if you want it to happen as someone opens the query window, then you can use the ON OPEN event which also includes the text of their first message. if you want it to trigger even if they type into a query window that you opened yourself, then it would be more complicated to track whether someone has previously said something into an arbitrary query window.