From WikiChip
Difference between revisions of "mirc/identifiers/$appactive"
m |
|||
Line 1: | Line 1: | ||
'''$appactive''' returns ''$true'' or ''$false'' depending on whether mIRC is the active window or not. | '''$appactive''' returns ''$true'' or ''$false'' depending on whether mIRC is the active window or not. | ||
− | = Synopsis = | + | == Synopsis == |
<pre>$appactive</pre> | <pre>$appactive</pre> | ||
− | = Switches = | + | == Switches == |
None | None | ||
− | = Results = | + | == Results == |
<span style="display: inline-block; width: 50px;">'''$true'''</span>mIRC is currently the active window. | <span style="display: inline-block; width: 50px;">'''$true'''</span>mIRC is currently the active window. | ||
<span style="display: inline-block; width: 50px;">'''$false'''</span>mIRC is currently '''not''' the active window. | <span style="display: inline-block; width: 50px;">'''$false'''</span>mIRC is currently '''not''' the active window. | ||
− | = Example = | + | == 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. | 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. | ||
Line 24: | Line 24: | ||
}</source> | }</source> | ||
− | = Compatibility = | + | == Compatibility == |
Added: mIRC v5.9 | Added: mIRC v5.9 | ||
Added On: 26/04/2001 | Added On: 26/04/2001 | ||
− | = See also = | + | == See also == |
* [[$appstate identifier - mIRC|$appstate]] | * [[$appstate identifier - mIRC|$appstate]] | ||
[[Category:mIRC identifiers]] | [[Category:mIRC identifiers]] |
Revision as of 14:26, 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