def _get_lastChild(self): childWindow=winUser.getTopWindow(self.windowHandle) nextWindow=winUser.getWindow(childWindow,winUser.GW_HWNDNEXT) while nextWindow: childWindow=nextWindow nextWindow=winUser.getWindow(childWindow,winUser.GW_HWNDNEXT) while childWindow and not isUsableWindow(childWindow): childWindow=winUser.getWindow(childWindow,winUser.GW_HWNDPREV) if childWindow: return Window(windowHandle=childWindow)
def _get_lastChild(self): childWindow=winUser.getTopWindow(self.windowHandle) nextWindow=winUser.getWindow(childWindow,winUser.GW_HWNDNEXT) while nextWindow: childWindow=nextWindow nextWindow=winUser.getWindow(childWindow,winUser.GW_HWNDNEXT) while childWindow and (not winUser.isWindowVisible(childWindow) or not winUser.isWindowEnabled(childWindow)): childWindow=winUser.getWindow(childWindow,winUser.GW_HWNDPREV) if childWindow: return Window(windowHandle=childWindow)
def _get_firstChild(self): childWindow=winUser.getTopWindow(self.windowHandle) while childWindow and not isUsableWindow(childWindow): childWindow=winUser.getWindow(childWindow,winUser.GW_HWNDNEXT) if childWindow: return Window(windowHandle=childWindow)