2008/4/29 Eric M. Hillman <[EMAIL PROTECTED]>: > I'm trying to build a listbox that will have about the same contents as the > "Applications" tab in Task manager, showing only those apps that have real, > focusable windows. I've been using Win32::GuiTest's "FindWindowLike" with > empty search strings to get a list of windows, but even with a search depth > of 1 I get a lot of what appear to be sub-windows of, say, Winamp or > UltraEdit. How do I filter those out, or is there a better way to be going > about this in the first place?
I have code to do this elsewhere - I will post next time I am at the right PC. I think there are a couple of things to test for: Whether the window is top-level or not, and whether the window is visible or not. Possibly some other things too. > Also, a possibly brain-damaged question - is there a canonical way to change > Windows handles (that is, the integers returned by, for example, > Win32::GUI::GetWindow()) into Win32::GUI objects? This seems like it ought > to be simple but I can't even find a useful example of how to do it. Most (but not all) methods that can be invoked on window objects can also be called with a window object or a window handle as a first argument: my $v = $win->IsVisible(); or my $v = Win32::GUI::IsVisible($win); my $v = Win32::GUI::IsVisible($hwnd); Regards, Rob. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/