Code: Select all
from win32gui import GetWindowPlacement
#SW_SHOWNORMAL = 1
#SW_SHOWMINIMIZED = 2
#SW_SHOWMAXIMIZED = 3
FindWin = eg.WindowMatcher(None, None, u'MediaPlayerClassicW' , None, None, None, True, 0.0, 0)
hwnd = FindWin()
def GetWindowStatus(hwnd):
showList = (None, "Normal", "Minimized", "Maximized")
placement = GetWindowPlacement(hwnd)
#unrem the below line to display the placement values that you need for the if placement[4] line
print placement
if placement[4] == (-1920, 1048, 0, 2128):
return "Fullscreen"
else:
return showList[placement[1]]
eg.globals.WindowsState = GetWindowStatus(hwnd[0])
print "Windows State = " + eg.globals.WindowsState