Note that if you remove the -n flag the script behaves as "expected".

It certainly seems like odd behavior, but /signal -n is an explicit flag to evaluate mid-event, at which point window state may be inconsistent.

In other words, $mouse.win may actually be returning the correct "active window" at the time of evaluation, but because of event processing order, mIRC might have temporarily changed the active window for other reasons. It probably shouldn't be doing this, but the workaround is simple enough, and you typically shouldn't need -n.

I would suggest that the problem here isn't the documentation for $mouse, but the undocumented side-effects of the -n flag in /signal.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"