Jump to content

Quick Q: Can you get a $hWND/handle from another script without looking for its title?


CrewXp
 Share

Recommended Posts

Hey, is there any way to get a program's handle without using Wingetprocess or looking for its title?

I know _Singleton can check for an existing script running, but if it is running, is there any way to return the handle of what's running if it is instead of exiting? I may have overlooked this.

Thanks!

Link to comment
Share on other sites

There are multiple ways to do it. One that would be simple to implement in AutoIt is a custom window message, that you can broadcast to all, or just one or more specific processes, and pass a HWND as the wParam/lParam.

Edited by danielkza
Link to comment
Share on other sites

yeah, ProcessList would only work if its assumed that I know the title or process name. But then again, I haven't seen _singleton's coding. Maybe singleton is just a roundabout simplified-way of using window titles?

Anyways, yeah, WindowMessage sounds promising. I'll search around for that if you dont have any links already off-hand. Thanks.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...