Skip to main content

Get-Active-Window

Command Description

Get the active window (activated in the foreground). Returned value is the window's handle

Command Prototype

objUiElement = Window.GetActive()

Parameter Description

ParameterRequiredTypeDefaultDescription
NoneNoneNoneNoneNone

objUiElement,The variable used to save the output of the command.

Demo

TracePrint "--------------------Get Active Window--------------------" 
// --------------------------------------------------------
// [Remarks] Get the active window

// Output parameters:
// objUiElement--the variable to which the output of the function call is saved

// Command prototype: objUiElement = Window.GetActive()
// --------------------------------------------------------

objUiElement = Window.GetActive()