code: def getWindowRect(self, hwnd):
          
          rect = ctypes.wintypes.RECT()
          if ctypes.windll.user32.GetWindowRect(hwnd, ctypes.byref(rect)):
              x1 = rect.left
              y1 = rect.top
              x2 = rect.right
              y2 = rect.bottom
              return (x1, y1, x2-x1, y2-y1)
          return None
docs: Returns a rect (x,y,w,h) for the specified window's area