How can I maximize a specific window with Python?

Posted by Shady on Stack Overflow See other posts from Stack Overflow or by Shady
Published on 2010-05-07T18:32:40Z Indexed on 2010/05/07 18:38 UTC
Read the original article Hit count: 345

Filed under:
|

I'm trying to maximize a specific window with python...

Here is the deal: I have a script that opens 2 firefox windows (selenium rc), and I need to maximize the second window, the last one that opens... How can I do it?

I'm using this command

window = win32gui.GetForegroundWindow()
win32gui.MoveWindow(window, 0, 0, 1440, 900, True)

that works perfectly, but only with the focus window... and the second window of firefox witch opens with the script doesnt get focused...

© Stack Overflow or respective owner

Related posts about python

Related posts about Windows