From WikiChip
Difference between revisions of "mirc/on events/on input"
< mirc‎ | on events

(Created On input event - mIRC)
 
m (Parameters: Link access levels)
 
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
{{mirc title|On Input - Events}}
 
The '''ON INPUT''' event triggers when text is entered into an [[mIRC]] editbox, then followed by an enter-key press.
 
The '''ON INPUT''' event triggers when text is entered into an [[mIRC]] editbox, then followed by an enter-key press.
  
Line 5: Line 6:
  
 
== Parameters ==
 
== Parameters ==
<span style="display: inline-block; width: 105px;">'''<level>'''</span>The level for the event to trigger.
+
<span style="display: inline-block; width: 105px;">'''<level>'''</span>The corresponding {{mIRC|access levels}} for the event to trigger.
  
 
<span style="display: inline-block; width: 105px;">'''<*#?=!@>'''</span>The window type that this event should monitor.
 
<span style="display: inline-block; width: 105px;">'''<*#?=!@>'''</span>The window type that this event should monitor.
Line 27: Line 28:
 
<source lang="mIRC">ON *:INPUT:*: {
 
<source lang="mIRC">ON *:INPUT:*: {
 
   if ($1 == ^scripts) {
 
   if ($1 == ^scripts) {
     echo -a There are $script(0) total scripts loaded.
+
     echo -a There are $script(0) script(s) loaded.
 
     haltdef
 
     haltdef
 
   }
 
   }
Line 33: Line 34:
  
 
The results would look something like this:
 
The results would look something like this:
<pre>There are 9 total scripts loaded.</pre>
+
<pre>There are 9 total script(s) loaded.</pre>
  
The example above makes use of the [[/haltdef command - mIRC|haltdef command]], which prevents mIRC from performing the default operation for this event. If there was no [[/haltdef command - mIRC|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.
+
The example above makes use of the {{mIRC|/haltdef}} command, which prevents mIRC from performing the default operation for this event. If there were no {{mIRC|/haltdef}} 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 ==
 
== Compatibility ==
Added: mIRC v5.0
+
{{mIRC compatibility|5.0}}
 
 
Added On: 02/04/97
 
  
 
== See Also ==
 
== See Also ==
 
* [[On keydown - mIRC|ON KEYDOWN]]
 
* [[On keydown - mIRC|ON KEYDOWN]]
 
* [[On keyup - mIRC|ON KEYUP]]
 
* [[On keyup - mIRC|ON KEYUP]]
 +
{{mIRC on event list}}
  
[[Category:mIRC on events]]
+
[[Category:mIRC on events|input]]

Latest revision as of 07:42, 6 February 2024

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

Synopsis[edit]

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

Parameters[edit]

<level>The corresponding access levels 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[edit]

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) script(s) loaded.
    haltdef
  }
}

The results would look something like this:

There are 9 total script(s) loaded.

The example above makes use of the /haltdef command, which prevents mIRC from performing the default operation for this event. If there were no /haltdef 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[edit]

Added: mIRC v5.0
Added on: 02 Apr 1997
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See Also[edit]