[python-win32] Trying to grab exe of foreground window

Roger Upole rwupole at msn.com
Tue Jul 21 07:46:04 CEST 2009


A sequence like this should get you there.

win32gui.GetForegroundWindow
win32process.GetWindowThreadProcessId
win32api.OpenProcess
win32process.EnumProcessModules
win32process.GetModuleFileNameEx

   hth
         Roger




More information about the python-win32 mailing list