Jump to content
Sign in to follow this  
sharrakor

Checking if the current window belongs to a PID

Recommended Posts

sharrakor

I've tried and tried, but the closest I've come is the ability to check if the current window has a certain title. I'm planning on checking for explorer windows via their PID, as thats all I'd imagine they have in common.

Share this post


Link to post
Share on other sites
sharrakor

Hmmm... I get this error:

if WinGetProcess($hWnd)=$pid then
if WinGetProcess(^ ERROR

Error: Variable used without being declared.

I have #include <winapi.au3>

How can I fix this?

Share this post


Link to post
Share on other sites
jvanegmond

You pass a handle to "current window" ( what you described in first post ) instead of $hWnd ...

$hWnd means Window Handle, which is a common data type.

Share this post


Link to post
Share on other sites
sharrakor

Thanks, I got it now.

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  

×