note
thundergnat
<p>If you just wnat to get a list of all the toplevel windows from within a single process, it is pretty easy. Something like this perhaps.</p>
<c>
use warnings;
use strict;
use Tk;
my $mw = MainWindow->new(-title => 'main window');
for (1..5) {
$mw->Toplevel(-title => "toplevel #$_");
}
for ($mw, $mw->children) {
print $_->cget('-title'),"\n" if /Toplevel/ or /MainWindow/;
}
MainLoop;
</c>
<p>To find windows owned by <i>other</i> processes, you are going to need to interact with the OS window manager and that is going to be very specific to the your needs and the OS/WM you are using. There's no portable easy answer.</p>
1018370
1018410