philz
Joined: 05 Jun 2007 Posts: 87 Location: USA
|
Posted: Thu Apr 17, 2008 11:50 am Post subject: Get Information of all windows in listview |
|
|
I don't know why something like this hasn't been posted already. I have seen many people trying to do something to all windows when they only intend to make it happen to all active windows. I too have had problems like this. In my shifty window script I also came across these problems, particulary with vista's sidebar gadgets. This script will show all relevent information for open windows.
I imagine the only reason something like this hasn't been posted is because it only took me about 5 minutes to write.
here is the code:
| Code: | Gui, Add, ListView, r20 w700 gMyListView, Title|Class|ID|PID|Process Name|Count|Maxmin|Transparent|Style
winget, allwindows, list
Loop, %allwindows% {
win := allwindows%A_index%
wingettitle, tit, ahk_id %win%
wingetclass, cls,ahk_id %win%
winget, id,id,ahk_id %win%
winget, pid,pid, ahk_id %win%
winget, pn,processname,ahk_id %win%
winget, cnt,count,ahk_id %win%
winget, mm,minmax,ahk_id %win%
winget, tsp,transparent,ahk_id %win%
winget, st,style,ahk_id %win%
LV_Add("", tit,cls,id,pid,pn,cnt,mm,tsp,st)
}
LV_ModifyCol() ; Auto-size each column to fit its contents.
LV_ModifyCol(3, "Integer")
LV_ModifyCol(4, "Integer")
LV_ModifyCol(6, "Integer")
LV_ModifyCol(8, "Integer")
Gui, Show
return
MyListView:
if A_GuiEvent = DoubleClick
{
LV_GetText(RowText, A_EventInfo) ; Get the text from the row's first field.
ToolTip You double-clicked row number %A_EventInfo%. Text: "%RowText%"
sleep, 1000
tooltip
}
return
GuiClose:
ExitApp |
|
|