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

m (Parameters)
m (Bot: Adding a template (template:mIRC on event list))
Line 39: Line 39:
 
== See Also ==
 
== See Also ==
 
[[On close - mIRC|ON CLOSE]]
 
[[On close - mIRC|ON CLOSE]]
 +
{{mIRC on event list}}
  
[[Category:mIRC on events]]
+
[[Category:MIRC on events]]

Revision as of 00:07, 4 July 2014

The ON OPEN event triggers within mIRC when a specific window type is opened, either locally, through server interaction, or due to a scripted circumstance. This event can be used to trigger scripted situations for actions to perform when a certain window is opened.

Much like the ON CLOSE event, the ON OPEN event triggers the $target identifier, and fills it with the window name related to the event. During the ON OPEN events, $target now refers to the window the event is dealing with.

Synopsis

ON <level>:OPEN:<?|@|=|!|*>:<matchtext>:<commands>

Parameters

<level>The level for the event to trigger.

<?|@|=|!|*>The window type that the event should trigger for:

?Private messages/query windows.
=DCC Chat windows.
!DCC Fileserv windows.
*All window types.

<matchtext>The text that should be matched. Can be a wildcard. Specifically for this event, this text will most-likely be from a private message query window opening up. The reason is that this will allow interaction with the text, during the event of a query window opening, immediately, rather than waiting for an ON TEXT event to trigger.

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

Examples

; When a query window opens, recognize if
; the user has typed the !yourserver command, which will
; relay to the user the current server for the mIRC client
 
ON *:OPEN:?:!yourserver:msg $nick Current IRC Server: $server $+ .

Compatibility

Added: mIRC v5.3

Added On: 13/12/97

See Also

ON CLOSE