The appactive event wasn't designed to detect clicks on mIRC's tray icon, so it looks like this was a side-effect. I'll see if I can add a specific event to handle tray clicks.