Sign in to follow this  
Followers 0
Sardith

Question

5 posts in this topic

#1 ·  Posted (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 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]

Share this post


Link to post
Share on other sites



#2 ·  Posted (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.

:D

Edit: Per SmOke_N and Nomad below... ProcessExists() or WinGetProcess() may get exactly what you want.

Thanks for the correction, guys.

Edited 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

Share this post


Link to post
Share on other sites

It's easier to get the PID by using ProcessExists('My.exe') ... ProcessExists() returns the PID.


[center]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.[/center]

Share this post


Link to post
Share on other sites

Or WinGetProcess() if you'd prefer to use the window title/handle.

Nomad :D


Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0