[python-win32] Figuring out why a window is losing focus

Zachary Turner zturner at google.com
Sun Feb 7 15:39:48 EST 2016


Why do you need to use Python?  Sounds like this is done very easily with
Spy++

On Sun, Feb 7, 2016 at 10:12 AM Ram Rachum <ram at rachum.com> wrote:

> Hi everybody,
>
> There's a problem in my Windows 7 machine that I want to diagnose using
> Python.
>
> Once in a while, I'm noticing that focus is being stolen from the active
> window and then immediately given back. For example, right now as I'm
> writing this message to you in GMail, I see that the window title, once in
> about 5 seconds, changes its color rapidly from active to inactive and then
> to active again. This happens not only in Chrome but in any program. It
> doesn't always happen, but it's been happening on some days during the last
> few months. This is really annoying because if I opened a dropdown, for
> example, this action makes the dropdown disappear. Another example is that
> if I'm renaming a file in explorer, when the event happens it's as if I
> pressed "enter" and the file gets the partial name before I finished
> typing.
>
> I'm guessing that some app that's installed on my computer is causing
> this, but I don't know which one. I want to use Python to figure out which
> one. I want to set Python up to listen to WM_ACTIVATE events (or any other
> kind of events? Please let me know) and write a log saying which program
> the focus was passed to. I'm hoping that this way I can find the offending
> program.
>
> I have no idea how to write a thing like this in Python, and whether this
> is even possible. Can you please help me?
>
>
> Thanks for your help,
> Ram Rachum.
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> https://mail.python.org/mailman/listinfo/python-win32
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20160207/b32d0619/attachment.html>


More information about the python-win32 mailing list