From WikiChip
mirc/on events/on input
< mirc‎ | on events
Revision as of 02:20, 25 June 2014 by Zmodem (talk | contribs) (Created On input event - mIRC)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The ON INPUT event triggers when text is entered into an mIRC editbox, then followed by an enter-key press.

Synopsis

ON <level>:INPUT:<*#?=!@>:<commands>

Parameters

<level>The level for the event to trigger.

<*#?=!@>The window type that this event should monitor.

*Any window
#Any channel, or specific channel name(s)
?Query windows
=DCC Chat windows
!Fserve windows
@Custom windows

<commands>The commands to be performed when the event listener's criteria is met.

Examples

If ^scripts is entered into an editbox, echo the total amount of loaded scripts to the active window:

ON *:INPUT:*: {
  if ($1 == ^scripts) {
    echo -a There are $script(0) total scripts loaded.
    haltdef
  }
}

The results would look something like this:

There are 9 total scripts loaded.

The example above makes use of the haltdef command, which prevents mIRC from performing the default operation for this event. If there was no haltdef command there, mIRC would carry out the first command, which was to echo the details to the active window, but then it would also either send the message to the active chat, or channel, or provide an error stating you are not currently on a channel.

Compatibility

Added: mIRC v5.0

Added On: 02/04/97

See Also