Results 1 to 4 of 4

Thread: list windows

  1. #1
    New Lounger
    Join Date
    Sep 2004
    Location
    Manhattan, New York, USA
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts

    list windows

    I'd like to write a script that creates a text file of all the open windows on a given workstation.

    I know that if I eat my peas I can find a way to do this via win32 API calls of some sort but I was hoping there might be a way via the Windows Scripting Host or some such.

    What I'd ideally like is something like this:
    ...
    for each Win in session.windows

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: list windows

    You might explore the Tasks object in VBA. But that probably won't do. I think your hunch about an API or two is the way to go. EnumWindows???
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: list windows

    Why use the scripting object when you can talk to the OS? Maybe you can adapt these old functions:

    <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=vb&Number=18202>http://www.wopr.com/cgi-bin/w3t/showthread...vb&Number=18202</A>

  4. #4
    New Lounger
    Join Date
    Sep 2004
    Location
    Manhattan, New York, USA
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: list windows

    Yeah; if I have to I will but I'd like to set this up as a .vbs, and .vbs doesn't support the Declare function. I guess I'll just have to write an executable.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •