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

2009-07-25 Thread reehdus
Awesome, thanks Eric, Roger and Tim for your help. Everything's been working fine so far. Here's what I've been using. It works on Vista too but I have admin access to that though. t,p = win32process.GetWindowThreadProcessId(hwnd)#find out PID to window handle =

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

2009-07-24 Thread Michel Claveau
Hi, Eric! Below, derived from your code, an exemple for to found modules in memory (useful for scan memory with clamwin, or other usages) @-salutations -- Michel Claveau import win32api,win32con,win32process,win32security # Request privileges to enable debug process, so we can later use

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

2009-07-23 Thread Tim Roberts
reehdus wrote: I see...I tried looking for documentation onw win32con to see what I needed but I couldn't muster up anything. All i got were win32con.PROCESS_TERMINATE and process query information so I assumed one of this was what I needed. Again...thanks so much for enlightening me.

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

2009-07-23 Thread Eric Blade
) From: reehdus sudheer...@hotmail.com To: python-win32@python.org Subject: Re: [python-win32] Trying to grab exe of foreground window Message-ID: 24617345.p...@talk.nabble.com Content-Type: text/plain; charset=us-ascii      Excellent...it works! Thanks...I put in the first sleep so I could

[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] 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 =

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

2009-07-21 Thread reehdus
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,p =

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

2009-07-20 Thread sudheer sivathasan
Hi guys, Normally I’m able to find the answers I’m looking for on the net…but this time, either I haven’t searched hard enough or no one has attempted this before, so I would really like to request some help with this. I’m trying to write a program to locate the directory of the .exe of the