Difference between revisions of "$appactive"

From Scriptwiki
Jump to: navigation, search
m (Reverted edit of Microbe, changed back to last version by Zyberdog)
m
 
(One intermediate revision by one other user not shown)
Line 8: Line 8:
 
This example will [[beep]] if someone mentions your nick in a channel, but only if you are currently looking at another application.
 
This example will [[beep]] if someone mentions your nick in a channel, but only if you are currently looking at another application.
  
   on *:[[On_text|TEXT]]:[[$()|$(]]* [[DollarPlus|$+]] [[$me]] $+ *):#:{
+
   on *:[[On_text|TEXT]]:[[$(...)|$(]]* [[DollarPlus|$+]] [[$me]] $+ *):#:{
 
     ;Checking if $appactive returns $false by prefixing it with the ! character.
 
     ;Checking if $appactive returns $false by prefixing it with the ! character.
 
     [[If-Then-Else|if]] (!$appactive) {
 
     [[If-Then-Else|if]] (!$appactive) {
Line 17: Line 17:
  
 
== See Also ==
 
== See Also ==
[[$appstate]] provides more detailed information about what state mIRC is in.
+
* [[$appstate]] provides more detailed information about what state mIRC is in.
  
 
[[Category:Window Identifiers]]
 
[[Category:Window Identifiers]]

Latest revision as of 11:10, 2 July 2007

Returns $true if mIRC is the active application, otherwise it returns $false.

$appactive
  • This identifier has no properties or options.

Example

This example will beep if someone mentions your nick in a channel, but only if you are currently looking at another application.

 on *:TEXT:$(* $+ $me $+ *):#:{
   ;Checking if $appactive returns $false by prefixing it with the ! character.
   if (!$appactive) {
     ;Beep because someone mentioned your nick, and you don't have mIRC in focus!
     beep
   }
 }

See Also

  • $appstate provides more detailed information about what state mIRC is in.