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

2009-07-22 Thread reehdus
Excellent...it works! Thanks...I put in the first sleep so I could test the program with various other applications, so it'd give me enough time to open up internet explorer or something...the second sleep was a typo...leftover from a bit of earlier code i did. I see...I tried looking

Re: [python-win32] handle is invalid?

2009-07-22 Thread reehdus
ahha...that would explain a lot...nope...roger's method was excellent...I was trying this out before I saw his recipe. I see...well...pardon my ignorance since I'm pretty new at Python...it didn't really occur to me that FindWindow was redundant. Well, now I know better...hahaha. Thanks! Tim Rob

[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_ = pythoncom.Crea

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 = win32gui.GetFore

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 =

[python-win32] Jonathan K Shelley is out of the office.

2009-07-22 Thread Jonathan K Shelley
I will be out of the office starting 07/21/2009 and will not return until 07/27/2009. I will respond to your message when I return. For assistance please contact Blaik Beattie (blaik.beat...@inl.gov)___ python-win32 mailing list python-win32@python.or

[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() t,