From WikiChip
mirc/identifiers/$appactive
< mirc‎ | identifiers
Revision as of 01:48, 23 June 2014 by Zmodem (talk | contribs) (Created $appactive identifier - mIRC)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

$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
  }
}

See also