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

2009-07-22 Thread Roger Upole
reehdus wrote: I tried that but I get stuck at EnumProcessModules. It tells me my access is denied. I'm not sure if I'm doing it right. My code is below: import win32gui import win32api import win32con from time import sleep import win32process sleep(2) name = win32gui.GetForegroundWindow()

Re: [python-win32] handle is invalid?

2009-07-22 Thread Tim Roberts
sudheer sivathasan wrote: Hey guys, Another quick question. I'm still trying to do the thing in the email below. But this time im trying to use the win32api.GetModuleFileName function. It requires a PyHandle as an input which I think I've managed to get by using the function handle =

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

2009-07-22 Thread Tim Roberts
reehdus wrote: I tried that but I get stuck at EnumProcessModules. It tells me my access is denied. I'm not sure if I'm doing it right. My code is below: import win32gui import win32api import win32con from time import sleep import win32process sleep(2) name =

[python-win32] (no subject)

2009-07-22 Thread Gary Smith
Hi All, I built a Python com server to solve regular expressions for use in a VBA application. Here's the code: import pythoncom import re import string class reObj: _public_methods_ = [re] _reg_progid_ = Python.reObj _reg_clsid_ =