Vindicator209 Posted January 22, 2007 Share Posted January 22, 2007 (edited) ^ TITLE Yea, how can I retrieve the window name when I onlyknow the process name? Thankss in advanced, for some reason, no matter how long I use autoit, I always hve these little questions ( sorry, I didnt wanna say newbish) EDIT: XD there should be a ProcessGetWin function XD Edited January 22, 2007 by MethodZero [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center] Link to comment Share on other sites More sharing options...
improbability_paradox Posted January 22, 2007 Share Posted January 22, 2007 (edited) Func _GetWHNDLFromPID($PID, $WTitle="") Local $wHndl="", $WCCount=0, $WList Do Local $WList=WinList($WTitle) for $WLCount= 1 to $WList[0][0] if WinGetProcess($WList[$WLCount][1])=$PID Then $wHndl=$WList[$WLCount][1] ExitLoop EndIf Next if $WCCount = 400 Then Return -1 Sleep(50) $WCCount += 1 Until not($wHndl="") Return $wHndl EndFuncoÝ÷ Û¥·º¹íáÚÙ^¡öçâ®ËpwhÂ+_wl¶Æ¬²"j×Â+a¶ :j¯zzk¡Ç¬±8^v¶°m§$ËajÖ©®²Éʯzj+zØZÞÂ)Ý£áÇîËb¢w(ºW[y§Z¦×¶Þ¶êç¶¡jwezÊjYpwhÂÇèºwm«[zZ'Ú¦ºz˺Ң}ý¶¯zئzÚ׫ÙèÀñ+ªl#¥Ó¹ëk'â®Ë©ÜxýX·}ÀÊ"*.r§ëazX§y«¢+Ø$$$$ÀÌØíÝ!¹°ôÀÌØí]1¥ÍÑlÀÌØí]1 ½Õ¹ÑulÅoÝ÷ ÚÚ¶§}í+ºÚ"µÍBBBIÌÍÝÒIÌÍÕÓÝÉÌÍÕÓÛÝ[VÌ the function will return the window title instead of the Handle (But, in most cases, the Handle is the more useful of the two as the title can change) Hope this helps! Edited January 22, 2007 by improbability_paradox Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 22, 2007 Moderators Share Posted January 22, 2007 http://www.autoitscript.com/forum/index.ph...st&p=244697 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Vindicator209 Posted January 22, 2007 Author Share Posted January 22, 2007 Thank you! [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center] 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