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

m (Bot: Adding a template (template:mIRC on event list))
m (Bot: Fixing links)
Line 1: Line 1:
 
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.
 
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 - mIRC|ON CLOSE]] event, the '''ON OPEN''' event triggers the [[$target identifier - mIRC|$target]] identifier, and fills it with the window name related to the event. During the '''ON OPEN''' events, [[$target identifier - mIRC|$target]] now refers to the window the event is dealing with.
+
Much like the [[On close - mIRC|ON CLOSE]] event, the '''ON OPEN''' event triggers the {{mIRC|$target}} identifier, and fills it with the window name related to the event. During the '''ON OPEN''' events, {{mIRC|$target}} now refers to the window the event is dealing with.
  
 
== Synopsis ==
 
== Synopsis ==

Revision as of 20:07, 5 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