关于 Window Active的问题的,希望大家能够帮我解决一下
最近碰到一个问题,问题如下:(因为这是一开始发到Mercury homepage的,所以是英文的)
Currently,I have encountered a problem which brought
me much more difficulties,hope somebody can help me.
The question is:
I use this following function to determine which window is the active window,but it always shows that the WinRunner
is the active window,I wonder how to make my expect window
become active window,I have tried to do it by moving cursor to the expected window and click it,but it also failed.
function GetActiveWindow()
{
auto WinNum = 0, WinLable="", WinActive;
while (win_exists ("{class: window, location: "&WinNum&"}")==E_OK)
{
win_get_info ("{class: window, location: "&WinNum&"}","active",WinActive);
if (WinActive == 1)
{
win_get_info ("{class: window, location: "&WinNum&"}","label",WinLable);
break;
}
WinNum++;
}
return WinLable;
}
Is there anybody who can give me some suggestion?Thanks in advance
页:
[1]