On 15 Mai, 15:06, Tom Gur <[EMAIL PROTECTED]> wrote: > Hi, > > I was wondering how do I get control over a window (Win32). > to be more specific, I need to find a handle to a window of a certain > program and minimize the window.
There are many ways to get the handle of a window. Assuming you have ctypes at hand, you could try: >> user32 = ctypes.windll.user32 >> hwnd = user32.FindWindowA(classname, title) >> if hwnd: >> user32.PostMessageA(hwnd, WM_SYSCOMMAND, SC_ICON, 0) If you need it more acurate you could search MSDN for how to enumerate all running processes and get the handles of their windows. Process32First (...) could be a start for reading. Jürgen -- http://mail.python.org/mailman/listinfo/python-list