murugans1011
12 years agoRegular Contributor
Toplevel window
how to check whether the window is top-level window using if condition..i have an apps which i will work with multiple window i want to find whether the window is top level window in desktop or not in...
- 12 years agoYou can use ActiveWindow method
function isWindowTop(wnd)
{
var topWin = Sys.Desktop.ActiveWindow();
return wnd.id == topWin.id;
}
Usage example:
var wCalc = Sys.Process("CalcPlus").Window("SciCalc");
Log.Message(isWindowTop(wCalc));
Prints True if Calculator is top-level, False otherwise