def get_tekken_window_rect(self, foreground_only=False): """ """ window_rect = None try: window_handler = None if foreground_only: if self.is_tekken_foreground_wnd(): window_handler = user32.get_foreground_window() else: window_handler = user32.find_window( lp_class_name='UnrealWindow', lp_window_name='TEKKEN 7 ') if window_handler: if not self.is_tekken_fullscreen(): # Unstyled window + titlebar rect window_rect = actual_rect.get_actual_rect(window_handler) self.adapt_window_rect_to_title_bar(window_rect) else: window_rect = user32.get_window_placement( window_handler).rc_normal_position except OSError: pass return window_rect
def get_tekken_window_position(self): tekken_rect = user32.get_window_placement( self.window_handler).rc_normal_position return (tekken_rect.left, tekken_rect.top)