Daniel Burgaud wrote:
> Hi
>
> Is there a way for Perl (GUITest or other modules for that matter) to
> know that
> a window is owned by a particular program?
GetWindowThreadProcessId might help you.
> Currently, I am using Win32::GUItest
>
>
> my @windows = FindWindowLike(0, program name, undef,0,0);
> my ($name, $x,$y,$w,$h);
> for my $id (@windows) {
> $name = GetWindowText($id);
> ($x,$y,$w,$h) = GetWindowRect($id);
> printf "%5d (%d,%d)(%d,%d) %s\n", $id, $x,$y,$w,$h, $name;
> }
>
> However, some programs change their window's name and its
> difficult/impossible to know if
> such window is what I am looking for.
>
> As an example, Internet Explorer's window title is always the webpage's
> title. And these
> webpage titles change as well. What I want is to find that IE browser's
> window and manipulate
> (resize/relocate) it.
MSIE has a different class you could search for in GuiTest (3rd arg to
FindWindowLike): IEFrame
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs