$active Retrieves the window ID of the active window
Usage
<integer> $active[(<irc context id:integer>)]
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, an invalid window ID is returned (0).
If no <irc context id> is specified, 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.

See also
$window

Index, Functions