在 Mac 环境下使用 Pyautogui 获取窗口并点击窗口,可以使用 Pyautogui 的 window 函数。 首先,在你的 Python 程序中导入 Pyautogui 模块: import pyautogui