Python 3.4 - how to get properties of an open window (size, position on screen e.t.c) and gui automation
Question: Python 3.4 . I want to get the properties of an open window (size, position on
screen e.t.c) if possible. is there an easy way to do this?. Also is there a
good module for simulating mouse clicks and key presses in an open application


Answer: if you using _tkinter_ , one of the most common GUI packet, then:

    
    
    from Tkinter import *
    
    root=Tk()
    
    root.geometry('400x600')
    
    root.update()
    
    print (root.winfo_width())
    print (root.winfo_height())
    print (root.winfo_x())
    print (root.winfo_y())
    
    root.mainloop()
    

you can replace:

    
    
    print (root.winfo_width())
    print (root.winfo_height())
    print (root.winfo_x())
    print (root.winfo_y())
    

with:

    
    
    print (root.winfo_geometry())
    

