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

m (PatrolBot moved page On close - mIRC to mirc/on events/on close: per new naming convention)
m (bot: cat fixing naming)
Line 45: Line 45:
 
{{mIRC on event list}}
 
{{mIRC on event list}}
  
[[Category:MIRC on events|close]]
+
[[Category:mIRC on events|close]]

Revision as of 14:29, 21 August 2014

The ON CLOSE event triggers within mIRC when a specific window type is closed, 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 closed.

The ON CLOSE event triggers the $target identifier to be filled with the window related to the event. This identifier can now be used to reference the specific window during these events.

Synopsis

ON <level>:CLOSE:<?|@|=|!|*>:<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.

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

Examples

; When DCC Chats are closed, send a notice to
; the person.
 
ON *:CLOSE:=:notice $nick Hey, thank you so much for the chat!
; When any window is closed, echo the window name
; to a custom @windowWatcher window. If that window doesn't exist,
; create it first.
 
ON *:CLOSE:*: {
  $iif(!$window(@windowWatcher),window @windowWatcher)
  echo @windowWatcher Window Closed: $target $+ .
}

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 OPEN