death pax Posted September 27, 2005 Share Posted September 27, 2005 Could anyone tell me how to get the HWND from a process id? Im sure its something really easy, but i have been looking through the help file for over an hour and havent figured it out thx ^.^ Link to comment Share on other sites More sharing options...
CyberSlug Posted September 27, 2005 Share Posted September 27, 2005 This might help:http://www.autoitscript.com/forum/index.php?showtopic=8179 Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
death pax Posted September 27, 2005 Author Share Posted September 27, 2005 (edited) i did edit the _processgetfirstwintitle a bit, because i already had the proper pid from a Run()original _processgetfirstwintitle can be found at http://www.autoitscript.com/forum/index.ph...wtopic=5806&hl=Func _ProcessGetFirstWinTitle($pid) local $testpid local $winlist ; Get window list $winList = WinList() ; Find which windows go with this process For $i = 0 To $winList[0][0] - 1 $testPid = WinGetProcess($winList[$i][1]) If $testPid = $pid Then Return $winList[$i][0] EndIf Next Return 0 EndFunc $uHwnd=WinGetHandle(_ProcessGetFirstWinTitle($pId)) Edited September 27, 2005 by death pax Link to comment Share on other sites More sharing options...
AznSai Posted September 27, 2005 Share Posted September 27, 2005 Could anyone tell me how to get the HWND from a process id? Im sure its something really easy, but i have been looking through the help file for over an hour and havent figured it out thx ^.^I think it requires the latest beta but you can use the HWnd() function to get the HWND from a process id. Link to comment Share on other sites More sharing options...
MrSpacely Posted September 27, 2005 Share Posted September 27, 2005 Also remember that one PID can have loads of HWNDs like explorer.exe has more then 50 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