Jump to content

Get the current active (foreground) child window process ID - (Moved)

Recommended Posts

Hi Guys,

I'm working on a project which I need to determine the current active child window and then return the Process ID of this window. With " WinGetTitle("[ACTIVE]")  " i can get the Process Id of chrome.exe . I need to get the Process Id of current active tab.

Specially in Chrome. I can get process ID of all running children of an App but not the one which is active now. I also tried wmic  queries but I got not perfect result.

Please Please help me. It is vital for me.

Is there any solution or maybe piece of code?

Thanks in advance for your help.

Best Regards

Link to post
Share on other sites
  • Developers

Moved to the appropriate forum, as the Developer General Discussion forum very clearly states:


General development and scripting discussions.

Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums.

Moderation Team

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
Live for the present,
Dream of the future,
Learn from the past.

Link to post
Share on other sites
Link to post
Share on other sites
1 minute ago, argumentum said:

...so, once you get the PID. What are you planning to do with it ?

i am developing an App of Desktop activity logging and I must detect the incognito tabs and avoid to log them at the same time I must log the normal tabs.

I've detected that there is a property for every Incognito tab Process Id which is True and for normal chrome tabs is False and that is "Disable Databases" which can be extracted from command line of every process.

And with PID of every Tab it is solved. 

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...