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

m (Bot: Fixing links)
m (Parameters: Link access levels)
 
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 +
{{mirc title|On Load - Events}}
 
The '''ON LOAD''' event is ran whenever a script is first loaded into mIRC's remotes section. Only one of these events may exist per script file.
 
The '''ON LOAD''' event is ran whenever a script is first loaded into mIRC's remotes section. Only one of these events may exist per script file.
  
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;">'''<commands>'''</span>The commands to be performed when the event listener's criteria is met.
 
<span style="display: inline-block; width: 105px;">'''<commands>'''</span>The commands to be performed when the event listener's criteria is met.
  
 
== Example ==
 
== Example ==
When the following script is loaded, it will give the user an [[$input identifier - mIRC|$input]] popup greeting:
+
When the following script is loaded, it will give the user an {{mIRC|$input}} popup greeting:
 
<source lang="mIRC">ON *:LOAD:noop $input(Thanks for loading my script!,oi,Script Loaded!)</source>
 
<source lang="mIRC">ON *:LOAD:noop $input(Thanks for loading my script!,oi,Script Loaded!)</source>
  
Line 21: Line 22:
  
 
== Compatibility ==
 
== Compatibility ==
Added: mIRC v2.1a
+
{{mIRC compatibility|5.0}}
 
 
Added On: 28/02/95
 
  
 
== See Also ==
 
== See Also ==
Line 29: Line 28:
 
* [[On unload - mIRC|ON UNLOAD]]
 
* [[On unload - mIRC|ON UNLOAD]]
 
* {{mIRC|/load}}
 
* {{mIRC|/load}}
* [[/unload commnand - mIRC|/unload]]
+
* {{mIRC|/unload}}
 
{{mIRC on event list}}
 
{{mIRC on event list}}
  
[[Category:MIRC on events]]
+
[[Category:mIRC on events|load]]

Latest revision as of 07:48, 6 February 2024

The ON LOAD event is ran whenever a script is first loaded into mIRC's remotes section. Only one of these events may exist per script file.

Synopsis[edit]

ON <level>:LOAD:<commands>

Parameters[edit]

<level>The corresponding access levels for the event to trigger.

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

Example[edit]

When the following script is loaded, it will give the user an $input popup greeting:

ON *:LOAD:noop $input(Thanks for loading my script!,oi,Script Loaded!)

Note: The above example can be executed directly from an mIRC command-line, without the ON LOAD event, by typing:

//noop $input(Thanks for loading my script!,oi,Script Loaded!)

The following is what the above will look like upon loading the script for the first time:

Shows the example results.

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]