Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re^2: TK Toplevel Window List (wm)

by Anonymous Monk
on Feb 12, 2013 at 16:46 UTC ( #1018410=note: print w/replies, xml ) Need Help??

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

Thank you, but which function would produce a window list? Or perhaps, there is a structure which should be examined?

Replies are listed 'Best First'.
Re^3: TK Toplevel Window List (wm)
by thundergnat (Deacon) on Feb 12, 2013 at 18:45 UTC

    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.

Re^3: TK Toplevel Window List (wm)
by Anonymous Monk on Feb 13, 2013 at 07:42 UTC

    Thank you, but which function would produce a window list?

    Perhaps one with "list" in the documentation, there aren't that many functions, you can find it, grep/ack makes it easier

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1018410]
[Eily]: as in "I might have inverted two, but my eyes misread in the some order as my fingers mistype"
[LanX]: can't find a definition for the sound
[LanX]: Voiceless_palatal_ fricative
[Eily]: Lanx https://en. wiki/Voiceless_pal atal_fricative
Eily got the Cowboy message
[Your Mother]: I prefer palatial fricatives.
[Lotus1]: https://en. wiki/%C3%87
[Your Mother]: I'm headed out west, sucker.
[Lotus1]: the west is the best, get here we'll do the rest
LanX chjuman !

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (18)
As of 2017-03-27 17:04 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (320 votes). Check out past polls.