I'm assuming that you want to be notified when you open a query window. The method I'm suggesting will only work when you double-click on a nickname in the nicklist of a channel.

Code:
- Open the options window (alt+o)
- Go to the 'Mouse' tab
- Paste the following in the textbox next to 'Nick List':

[color:blue]//query $$1 | echo -s Just opened $$1 query window[/color]

- Click OK


That will open a query window when you double-click on a nick in the nicklist, and it will echo a notification to the status window.

-genius_at_work