ivan Posted November 18, 2005 Share Posted November 18, 2005 (edited) It must be the fourth or fifth time I've needed to retreive the pid of the active window, so I wrote a little function that does the job. The function returns a 2 element array containing the pid and handle of the active window, respectively. Many of you will probably find it useless, but here it goes Edit: Sorry lads, I forgot I had a commented msg box in the script i used to debug I've just realized there is no such thing as get the pid of the active window, so I'm a bit surprised this subject hasn't been posted before.GetActiveWin.au3 Edited November 18, 2005 by ivan Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3 Link to comment Share on other sites More sharing options...
layer Posted November 18, 2005 Share Posted November 18, 2005 The name of the function is differen't than the name in the comments. FootbaG Link to comment Share on other sites More sharing options...
ivan Posted November 18, 2005 Author Share Posted November 18, 2005 You're totally right. I corrected it in the first post and thanks for your comment. Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3 Link to comment Share on other sites More sharing options...
layer Posted November 19, 2005 Share Posted November 19, 2005 (edited) You're totally right. I corrected it in the first post and thanks for your comment.Oops ! I probably should have told you to keep _WinGetActive or some such... To keep the namespace in-line with the other WinFuctions :"> So instead of GetActiveWin, something like _WinGetActive would "fit" better.P.S,I think a while ago someone posted a _WinGetPID function, or something along that line... Edited November 19, 2005 by layer FootbaG Link to comment Share on other sites More sharing options...
ivan Posted November 21, 2005 Author Share Posted November 21, 2005 Thanks for replying and please forgive me for not doing so promtly (my internet connection got cut off during the week end, so I've some catching up to do). I wrote a few similar functions, but I believe I never posted them as udf, just as code. I'll ammend the udf and post it again. The good news is that there's quite a bit that can be done on the window handle and process id matching, so there's a hell of a lot of room for improvement on this one. Probably by the time I'm done with it, it won't turn out to be such a bore. Thanks for your comments. IVAN. Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3 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