on INPUT triggers for text you enter in a window editbox, regardless of whether or not that text results in a message being sent somewhere. on INPUT includes windows that aren't even valid targets for messages (such as the Status window).
To detect outgoing messages you have a few options:
1) Make a "msg" alias that does whatever it is you need. This can be proactive (you can change the message before it's sent), but will only catch messages sent with /msg, so you'll still need an on INPUT event if you want to catch directly-typed messages too.
2) Use /debug's -i switch to parse incoming/outgoing IRC protocol messages. This is purely reactive (you can't change/stop messages using this method).
3) Use Saturn's io.dll
. This can be proactive, and, like /debug, will allow you to catch all outgoing messages on the protocol level. The disadvantage is that it needs updating with each new mIRC release.