CountyIT Posted December 8, 2012 Share Posted December 8, 2012 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? Link to comment Share on other sites More sharing options...
FireFox Posted December 8, 2012 Share Posted December 8, 2012 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. Link to comment Share on other sites More sharing options...
CountyIT Posted December 8, 2012 Author Share Posted December 8, 2012 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. Link to comment Share on other sites More sharing options...
FireFox Posted December 8, 2012 Share Posted December 8, 2012 I can build you an exclude list on both OS. Link to comment Share on other sites More sharing options...
FireFox Posted December 9, 2012 Share Posted December 9, 2012 (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 December 9, 2012 by FireFox Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now