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

(Created On open event - mIRC)
 
m (Parameters)
Line 11: Line 11:
 
<span style="display: inline-block; width: 105px;">'''<?|@|=|!|*>'''</span>The window type that the event should trigger for:
 
<span style="display: inline-block; width: 105px;">'''<?|@|=|!|*>'''</span>The window type that the event should trigger for:
  
<span style="border-right: 1px dashed rgba(0,0,0,.15); display: inline-block; margin-left: 105px; margin-right: 25px; width: 30px;">'''?'''</span>Private messages/query windows.
+
<div style="background-color: rgba(0,0,0,.03); display: block;"><span style="border-right: 1px dashed rgba(0,0,0,.15); display: inline-block; margin-left: 105px; margin-right: 25px; width: 30px;">'''?'''</span>Private messages/query windows.</div>
  
<span style="border-right: 1px dashed rgba(0,0,0,.15); display: inline-block; margin-left: 105px; margin-right: 25px; width: 30px;">'''@'''</span>[[Custom Windows - mIRC|Custom @windows]]
+
<div style="background-color: rgba(0,0,0,.06); display: block;"><span style="border-right: 1px dashed rgba(0,0,0,.15); display: inline-block; margin-left: 105px; margin-right: 25px; width: 30px;">'''@'''</span>[[Custom Windows - mIRC|Custom @windows]]</div>
  
<span style="border-right: 1px dashed rgba(0,0,0,.15); display: inline-block; margin-left: 105px; margin-right: 25px; width: 30px;">'''='''</span>DCC Chat windows.
+
<div style="background-color: rgba(0,0,0,.03); display: block;"><span style="border-right: 1px dashed rgba(0,0,0,.15); display: inline-block; margin-left: 105px; margin-right: 25px; width: 30px;">'''='''</span>DCC Chat windows.</div>
  
<span style="border-right: 1px dashed rgba(0,0,0,.15); display: inline-block; margin-left: 105px; margin-right: 25px; width: 30px;">'''!'''</span>DCC Fileserv windows.
+
<div style="background-color: rgba(0,0,0,.06); display: block;"><span style="border-right: 1px dashed rgba(0,0,0,.15); display: inline-block; margin-left: 105px; margin-right: 25px; width: 30px;">'''!'''</span>DCC Fileserv windows.</div>
  
<span style="border-right: 1px dashed rgba(0,0,0,.15); display: inline-block; margin-left: 105px; margin-right: 25px; width: 30px;">'''*'''</span>All window types.
+
<div style="background-color: rgba(0,0,0,.03); display: block;"><span style="border-right: 1px dashed rgba(0,0,0,.15); display: inline-block; margin-left: 105px; margin-right: 25px; width: 30px;">'''*'''</span>All window types.</div>
  
 
<span style="display: inline-block; width: 105px;">'''<matchtext>'''</span>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 - mIRC|ON TEXT]] event to trigger.
 
<span style="display: inline-block; width: 105px;">'''<matchtext>'''</span>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 - mIRC|ON TEXT]] event to trigger.

Revision as of 18:47, 24 June 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