def QQ_OpenActiveWindow(): hwnd = QQ_checkTargetWindow() if hwnd == 0: return False win32gui.SetForegroundWindow(hwnd) return True # Press the "Alt + H' key.