Sardith Posted July 16, 2006 Share Posted July 16, 2006 (edited) The hl2.exe doesn't show up in applications under task manger, but under processes it appears as hl2.exe. I was trying WinGetHandle("hl2.exe").... which isn't getting a handle for some reason. This has me really lost as to whats wrong. If anyone has so advice please let me know. When you spy it, I can find the window I need. "Valve001", which when I try to locate it with autoit it doesn't it work. Can you get handle's of sub windows of a process? Edited July 16, 2006 by Sardith [font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font] Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 17, 2006 Share Posted July 17, 2006 (edited) The hl2.exe doesn't show up in applications under task manger, but under processes it appears as hl2.exe. I was trying WinGetHandle("hl2.exe").... which isn't getting a handle for some reason. This has me really lost as to whats wrong. If anyone has so advice please let me know.When you spy it, I can find the window I need. "Valve001", which when I try to locate it with autoit it doesn't it work. Can you get handle's of sub windows of a process?The WinGetHandle() function returns the handle of a Window, found by title, not process name. If there is a window associated with that process (there may not be), then use the AutoIT Windows Info utility to get its proper title.If by handle you mean the PID of the process, you could use ProcessList() to find it among a list of all processes. Edit: Per SmOke_N and Nomad below... ProcessExists() or WinGetProcess() may get exactly what you want.Thanks for the correction, guys. Edited July 17, 2006 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 17, 2006 Moderators Share Posted July 17, 2006 It's easier to get the PID by using ProcessExists('My.exe') ... ProcessExists() returns the PID. 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...
Nomad Posted July 17, 2006 Share Posted July 17, 2006 Or WinGetProcess() if you'd prefer to use the window title/handle. Nomad Link to comment Share on other sites More sharing options...
Sardith Posted July 17, 2006 Author Share Posted July 17, 2006 Thanks alot guys, i'll give this a try. Your replys mean alot , thanks. [font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font] 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