[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 247
  • Last Modified:

find handle of foreground window

the frontmost notepad, for instance.
0
Troudeloup
Asked:
Troudeloup
  • 2
  • 2
1 Solution
 
josgoodCommented:
In Windows, the GetForeGroundWindow API function will do the trick.  See
   http://msdn2.microsoft.com/en-us/library/ms633505.aspx
0
 
TroudeloupAuthor Commented:
how do I use the api in python?
0
 
josgoodCommented:
I don't know python, so take this with a grain of salt, but a Google search leads me to believe
   win32gui.GetForegroundWindow()
is the way you do it.

Does that make sense or am I hopelessly out in left field?
0
 
TroudeloupAuthor Commented:
i think you provided a vital pointer.

i didin't know python can do that  O_o

0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now