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

m (bot: sort-key added to category)
m (PatrolBot moved page On open - mIRC to mirc/on events/on open: per new naming convention)
(No difference)

Revision as of 01:10, 13 August 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 Dec 1997
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See Also

ON CLOSE