From WikiChip
Difference between revisions of "mirc/identifiers/$appactive"
< mirc‎ | identifiers

(Created $appactive identifier - mIRC)
 
m
Line 23: Line 23:
 
   }
 
   }
 
}</source>
 
}</source>
 +
 +
= Compatibility =
 +
Added: mIRC v5.9
 +
 +
Added On: 26/04/2001
  
 
= See also =
 
= See also =

Revision as of 13:48, 23 June 2014

$appactive returns $true or $false depending on whether mIRC is the active window or not.

Synopsis

$appactive

Switches

None

Results

$truemIRC is currently the active window.

$falsemIRC is currently not the active window.

Example

Let's say you have a listening event, just to make mIRC beep if someone uses your name in a channel. We call these notifications, as well as highlights. Well, if mIRC is the currently active window, these sounds can be either annoying or meaningless. Therefore, we would set up the listener to check the $appactive identifier to make sure mIRC is not active before sending out the audible notification.

ON *:TEXT:$($+(*,$me,*)):#: {
  ; Make sure mIRC is not the active application
  if (!$appactive) {
 
    ; Execute 5 beeps at 200 millisecond intervals
    beep 5 200
  }
}

Compatibility

Added: mIRC v5.9

Added On: 26/04/2001

See also