def GetWinByTitle(cls, clsname=None, win_title=None, is_foreground=True):
"""
FindWindow? ????
"""
whd = 0
if clsname and win_title:
whd=win32gui.FindWindow(clsname, win_title)
elif clsname:
whd=win32gui.FindWindow(clsname, None)
elif win_title:
whd=win32gui.FindWindow(None, win_title)
if whd and is_foreground == True:
cls.SetAsForegroundWindow(whd)
return whd
评论列表
文章目录