death pax Posted September 27, 2005 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 ^.^
CyberSlug Posted September 27, 2005 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!
death pax Posted September 27, 2005 Author 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
AznSai Posted September 27, 2005 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.
MrSpacely Posted September 27, 2005 Posted September 27, 2005 Also remember that one PID can have loads of HWNDs like explorer.exe has more then 50
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