pip install pyautogui
import pyautogui import time while True: pyautogui.hotkey('ctrl', 'tab') # 可以使用组合键,本质上是 ''' pyautogui.keyDown('shift') pyautogui.keyDown('a') pyautogui.keyUp('shift') pyautogui.keyUp('a') ''' time.sleep(10)