Sign in to follow this  
Followers 0
CountyIT

Need some help with Winlist()

5 posts in this topic

Winlist is a great little function but I am having trouble interpreting the results. The list is really, really long. If I "filter" it with the IsVisible it helps a great deal but there are still some entries I I am trying to figure out what to to with.

"Program Manager" shows up and there are several with no title yet a handle. I would assume some of these entries at coming from the task bar icons? I have even seen times where "Start" shows up in the window list.

Here is where I am going to get in trouble and chastised but need to ask the question anyway. I don't want to concern myself with "OS" windows like Start or Program Manager and don't want to concern myself with Task Bar windows. The only thing I really want to know is the list of "Standard" windows open (or minimized) on the desktop. Is there a way to do that?

Share this post


Link to post
Share on other sites



Hi,

It's not possible to interact with the taskbar on Win7, just make an exclude list or you can loop through windows styles and determine if it's minimized, visible etc.

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

That is more or less what I am asking but more along the lines of if there is a built-in "exclude" list as opposed to making my own. This script needs to work on XP or Win 7. I don't want to mess with "OS" Windows or Task Bar Windows.

Share this post


Link to post
Share on other sites

I can build you an exclude list on both OS.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Here is a sample for Win7 :

#include <Array.au3>
#include <WinAPI.au3>

Local $var = WinList()
Local $aWnd[$var[0][0]], $i2 = 0

Local $aExcludeClass[2] = [ _
"Button", _ ;start button
"Progman"] ;desktop

For $i = 1 To $var[0][0]
; Only display visble windows that have a title
If $var[$i][0] <> "" And IsVisible($var[$i][1]) _
And _ArraySearch($aExcludeClass, _WinAPI_GetClassName($var[$i][1])) = -1 Then
$aWnd[$i2] = $var[$i][0]
$i2+=1
EndIf
Next

ReDim $aWnd[$i2]
_ArrayDisplay($aWnd)

Func IsVisible($handle)
If BitAND(WinGetState($handle), 2) Then
Return 1
Else
Return 0
EndIf
EndFunc ;==>IsVisible

As you can see I use window classes, because it does not change regarding to the computer language.

Br, FireFox.

Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0