I'm a python newb, but I just wanted to write a quick script to determine whether or not notepad was the focused window. Doesn't seem to work unfortunately, please let me know what I'm doing wrong.
import win32gui
w=win32gui
eg.result = GetWindowText (w.GetForegroundWindow()) == 'notepad.exe'
[edit] ack i think if i just did w.GetWindowText instead, it might work. I'll test at home later
Help determining whether window is focused
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: Help determining whether window is focused
The answer I sent in another topic: http://www.eventghost.org/forum/viewtop ... f=2&t=1218
Pako
Pako