FunkyBunnies Posted March 10, 2009 Share Posted March 10, 2009 (edited) Heyo all! I'm trying to work on a context sensitive virtual toolbar of hotkeys for many different apps. I have little snippets and tests here and there but a few things have been confusing me early on one is how I can find what applications are open at the moment, or what windows belong to what applications even any help is greatly appreciated! Edited March 10, 2009 by FunkyBunnies Link to comment Share on other sites More sharing options...
Manko Posted March 10, 2009 Share Posted March 10, 2009 Haven't tried, but looked promising... You might have to read to the end?http://www.autoitscript.com/forum/index.ph...esktop&st=0/Manko Yes i rush things! (I sorta do small bursts inbetween doing nothing.) Things I have rushed and reRushed:* ProDLLer - Process manager - Unload viri modules (dll) and moore...* _WinAPI_ProcessListOWNER_WTS() - Get Processes owner list...* _WinAPI_GetCommandLineFromPID() - Get commandline of target process...* _WinAPI_ThreadsnProcesses() Much info if expanded - optional Indented "Parent/Child"-style Processlist. Moore to come... eventually... Link to comment Share on other sites More sharing options...
picea892 Posted March 10, 2009 Share Posted March 10, 2009 Try this........... I didn't make it, I got it off the forum somewhere and tweaked. You have window name and class of each window. Combine the two and you can associate the window a specific program. #include <Array.au3> #include <Winapi.au3> Global $aWinList, $aRetWinList $sExclude_List = "Start[CL:102939]|Start|Desktop|Start Menu[CL:102938]|desktop[CL:102937]|Program Manager" $aWinList = _WinListEx(Default, Default, $sExclude_List) _ArrayDisplay($aWinList) Func _WinListEx($sTitle="", $sText="", $sExclude_List="") $sExclude_List = "|" & $sExclude_List & "|" If $sTitle = -1 Or (IsKeyword($sTitle) And $sTitle = Default) Then $aWinList = WinList() Else $aWinList = WinList($sTitle, $sText) EndIf Dim $aRetWinList[$aWinList[0][0]][6] For $i = 1 To $aWinList[0][0] ;Only display visible windows that have a title If $aWinList[$i][0] = "" Or Not BitAND(WinGetState($aWinList[$i][1]), 2) Then ContinueLoop ;Add to array all win titles that is not in the exclude list If Not StringInStr($sExclude_List, "|" & $aWinList[$i][0] & "|") Then $aRetWinList[0][1] += 1 $aRetWinList[$aRetWinList[0][1]][0] = $aWinList[$i][0] $aRetWinList[$aRetWinList[0][1]][1] = $aWinList[$i][1] $classed = _WinAPI_GetClassName($aWinList[$i][1]) $aRetWinList[$aRetWinList[0][1]][2] = "[CLASS:"&$classed&"]" EndIf Next ReDim $aRetWinList[$i][6] Return $aRetWinList EndFunc Link to comment Share on other sites More sharing options...
FunkyBunnies Posted March 11, 2009 Author Share Posted March 11, 2009 Awesome, thank you both a ton after looking into this, I'm not sure I can get the information I need out of the Class of the window. If I can bother you with more questions, is there any way to find the executable associated with a window or even to list what .exe's are running? Link to comment Share on other sites More sharing options...
Ascend4nt Posted March 11, 2009 Share Posted March 11, 2009 (edited) WinGetProcess(). For a list of exe's running, PRocessList(). It's all there in the Help file *sorry, should have noted - you can combine both to find the exe *name* (first gets the PID, 2nd gets a list of names with PIDs) Edited March 11, 2009 by ascendant My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) 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