"Etayki" <[EMAIL PROTECTED]> wrote: > I'm trying to maximize a IE window. I have a handler and I'm trying to > call ShowWindow to maximize it: > > ie = Dispatch('InternetExplorer.Application') > handler = ie.HWND > ie.Visible = 1 > win32gui.ShowWindow(handler, SW_MAXIMIZE) > > But then I get this error: > 'SW_MAXIMIZE' is not defined
SW_MAXIMIZE is a C preprocessor constant (a define), which means it only exists in a Windows-specific header file (winuser.h, in this case). > How do I get SW_MAXIMIZE to be defined? by grepping through the Windows header files to see what the corresponding value is, and using that value to set a Python variable in your script: > grep SW_MAXIMIZE *.H WINUSER.H:#define SW_MAXIMIZE 3 corresponds to SW_MAXIMIZE = 3 </F> -- http://mail.python.org/mailman/listinfo/python-list