[python-win32] Wait for a window with a specified title

2018-05-27 Thread Ram Rachum
Hi everyone, I'd like to use the `wmi` module to detect when a window with the title "Foo Bar" was created, and then kill the process that created this window. Is this possible? (I can do the killing without `wmi`, I just need to ID the process.) Note that I don't want to be periodically polling

Re: [python-win32] get MAPI session from OOM

2018-05-27 Thread c . kristukat
Am 26. Mai 2018 21:54:36 GMT-03:00 schrieb [email protected]: >On May 26, 2018, at 5:21 AM, [email protected] wrote: >> >> on a 64bit windows 7 machine with pywin32 221 I used to get a pointer >to the MAPI session like this >> >> >outlook.GetNamespace('MAPI').Session.MAPIOBJECT.QueryInterface(mapi.II

Re: [python-win32] get MAPI session from OOM

2018-05-27 Thread c . kristukat
-- Originalnachricht -- Von: [email protected] An: "Python-Win32 List" Gesendet: 26.05.2018 21:54:36 Betreff: Re: [python-win32] get MAPI session from OOM On May 26, 2018, at 5:21 AM, [email protected] wrote: on a 64bit windows 7 machine with pywin32 221 I used to get a pointer to the MAPI

Re: [python-win32] Wait for a window with a specified title

2018-05-27 Thread Tim Roberts
On May 27, 2018, at 6:36 AM, Ram Rachum wrote: > > I'd like to use the `wmi` module to detect when a window with the title "Foo > Bar" was created, and then kill the process that created this window. Is this > possible? Not with WMI, no. > (I can do the killing without `wmi`, I just need to

Re: [python-win32] Wait for a window with a specified title

2018-05-27 Thread Ram Rachum
On Mon, May 28, 2018 at 7:11 AM, Tim Roberts wrote: > On May 27, 2018, at 6:36 AM, Ram Rachum wrote: > > > > I'd like to use the `wmi` module to detect when a window with the title > "Foo Bar" was created, and then kill the process that created this window. > Is this possible? > > Not with WMI,

Re: [python-win32] Wait for a window with a specified title

2018-05-27 Thread Tim Roberts
On May 27, 2018, at 10:19 PM, Ram Rachum wrote: > > Oh, that sounds heavy. I guess I'm back to polling. Any idea how to do this > with polling? It would be easy with polling. You'd use EnumWindows to go through the list of all top-level windows, GetWindowText to get the window title, GetWin