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 =
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
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.
)
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
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()
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 =
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 =
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