Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^3: TK Toplevel Window List (wm)

by thundergnat (Deacon)
on Feb 12, 2013 at 18:45 UTC ( #1018425=note: print w/replies, xml ) Need Help??

in reply to Re^2: TK Toplevel Window List (wm)
in thread TK Toplevel Window List

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.

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;

To find windows owned by other 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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1018425]
[shmem]: go figure. Might help to open views to other ways of perceiving reality. No, no supernatural stuff.
[shmem]: the "Vineyard" is a biblic term, also. But that's not the point.
[erix]: sorry, my attention is a rar commodity. I will not squander it on such pro-russia sites :)
[erix]: *rare commodity
[shmem]: erix: you are utterly mistaken in marking that site as "pro-russian".
[erix]: how do you mean? the bear, explanations of Putin's "election", the fearsome new russian weaponry. I came across them immediately. Just coincidence?
[shmem]: No, not coincidence - prejudice and bias

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2018-03-19 21:03 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (246 votes). Check out past polls.