# $active

Retrieves the window ID of the active window

Syntax

    $active[(<irc context id>)]

Description

Returns the window ID of the active window bound to the IRC context specified by <irc context id>. If no window matches the specified IRC context, and invalid window ID is returned (0).
If no <irc context id> is specified, this function returns the active window of the current IRC context (if any).
If the current window is not bound to any IRC context, its own ID is returned. If the <irc context id> is the special word 'all' then the application active window is returned (the window that currently has the input focus). Note that in this case the returned window may also belong to another IRC context or be not bound to any IRC context at all. In some extreme cases you may even get a window that has no output widget and thus has its output redirected. Using the "global" active window should be used only for communicating something REALLY urgent (and maybe unrelated to a specific IRC connection) to the user.

Examples

See also
$window,

Index, Functions

KVIrc 3.2.0 Documentation
Generated by root at Thu Mar 9 08:43:54 2006