misakamikodo / mhxy_script

梦幻西游手游脚本(基于pyautogui、opencv,在python环境下运行文件)
161 stars 61 forks source link

mac 跑起来报错 #20

Open pawns opened 7 months ago

pawns commented 7 months ago

mac点击 所有的按钮都报错

windows = pyautogui.getAllWindows()

AttributeError: module 'pyautogui' has no attribute 'getAllWindows'

windowsList = pyautogui.getWindowsWithTitle('梦幻西游:时空') AttributeError: module 'pyautogui' has no attribute 'getWindowsWithTitle' 小白,不懂python 不知道用什么替换

misakamikodo commented 7 months ago

https://automatetheboringstuff.com/2e/chapter20/ 中 As of version 0.9.46, PyAutoGUI’s window features work only on Windows, not on macOS or Linux. These features come from PyAutoGUI’s inclusion of the PyGetWindow module. 看起来确实不支持