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

(created on start event)
 
m (See Also)
Line 32: Line 32:
  
 
==See Also==
 
==See Also==
*[[on LOAD - mIRC|on LOAD]]
+
*[[On load - mIRC|ON LOAD]]
*[[on UNLOAD - mIRC|on UNLOAD]]
+
*[[On unload - mIRC|ON UNLOAD]]
*[[on EXIT - mIRC|on EXIT]]
+
*[[On exit - mIRC|ON EXIT]]
 
*[[/load command - mIRC|/load command]]
 
*[[/load command - mIRC|/load command]]
  
 
[[Category:mIRC on events]]
 
[[Category:mIRC on events]]

Revision as of 17:52, 25 June 2014

The on start event triggers either when mIRC is started, or a script file is loaded, either through the scripts editor, or via the /load command. Only one on start event is allowed per script file.

Synopsis

on <level>:START:<commands>

Parameters

<level>
The access level required for the event to trigger.
<commands>
The commands to be performed when the event is triggered.

Examples

Add a pre-typed command to connect to certain networks upon pressing enter to the editbox:

on *:START:{
  var %c $chr(124) server -m
  editbox -a //server irc.swiftirc.net %c irc.dal.net %c irc.efnet.org
}


Create a hash table named ircpoints and load data from a file named ircpoints.hsh into the table if the file exists:

on *:START:{
  if (!$hget(ircpoints)) { hmake ircpoints }
  if ($file(ircpoints.hsh).longfn) { hload ircpoints $v1 }
}

Compatibility

Added: v2.1a

Added on: 28/02/95

See Also