Re: [python-win32] Cleanly Close System Tray Process

2006-08-02 Thread Gregory Piñero
I documented this code and added some background info here: http://www.answermysearches.com/index.php/why-killing-processes-may-be-hurting-you-and-what-to-do-about-it/154/ On 8/2/06, Gregory Piñero <[EMAIL PROTECTED]> wrote: > On 8/2/06, Tim Roberts <[EMAIL PROTECTED]> wrote: > > This code is not

Re: [python-win32] Cleanly Close System Tray Process

2006-08-02 Thread Gregory Piñero
On 8/2/06, Tim Roberts <[EMAIL PROTECTED]> wrote: > This code is not actually correct. There can be many windows for a > given window class, but your get_all_windows function will only return > the last one found for each class. A better implementation of > _MyCallback would be: Thanks for the c

Re: [python-win32] Cleanly Close System Tray Process

2006-08-02 Thread Tim Roberts
On Tue, 1 Aug 2006 15:34:56 -0400, " Gregory Pi?ero " <[EMAIL PROTECTED]> wrote: >Ok I figured out how to do it: > >Here's the code I made mostly from copying the examples. If anyone >could tell me how the code works, that would still be appriciated, for >example why/how do I need this function _

Re: [python-win32] Cleanly Close System Tray Process

2006-08-01 Thread Metz, Bobby W, WWCS
Sent: Tuesday, August 01, 2006 11:24 AM To: python-win32@python.org Subject: [python-win32] Cleanly Close System Tray Process Hi guys, I've got this little yellow icon sitting in my system tray: http://i7.tinypic.com/21n08ig.png I'd like to use the windows API to somehow ask it to shutdow

Re: [python-win32] Cleanly Close System Tray Process

2006-08-01 Thread Gregory Piñero
Ok I figured out how to do it: Here's the code I made mostly from copying the examples. If anyone could tell me how the code works, that would still be appriciated, for example why/how do I need this function _MyCallback? -Greg My code: import sys import win32process, win32api, win32pdhutil, w

Re: [python-win32] Cleanly Close System Tray Process

2006-08-01 Thread Mark Mc Mahon
Hi, On 8/1/06, Gregory Piñero <[EMAIL PROTECTED]> wrote: > Hi guys, > > I've got this little yellow icon sitting in my system tray: > http://i7.tinypic.com/21n08ig.png > > I'd like to use the windows API to somehow ask it to shutdown? If a > system tray icon counts as a window then perhaps I coul

[python-win32] Cleanly Close System Tray Process

2006-08-01 Thread Gregory Piñero
Hi guys, I've got this little yellow icon sitting in my system tray: http://i7.tinypic.com/21n08ig.png I'd like to use the windows API to somehow ask it to shutdown? If a system tray icon counts as a window then perhaps I could get its hwnd and do something like: win32gui.PostMessage(hwnd, win32