请教一个问题。pyautogui.pixel 及 pyautogui.pixelMatchesColor为什么用不了?
问题描述:
在编个自动化的小程序,需要判断屏幕某点颜色,发现pyautogui.pixel() 及 pyautogui.pixelMatchesColor()不能正常工作,
总是出错。实在不明白。这是为什么?怎么解决?
答
这是一个软件版本运行中bug,解决办法,升级 PyScreeze到 0.1.28使用命令: pip install -U pyscreeze.
参考:
windows - Pyautogui and pyscreeze crash with windll.user32.ReleaseDC failed - Stack Overflow
I'm trying to compare certain pixel values in my pyautogui script, but it crashes with following error message after either multiple successful runs, or sometimes just straight on the first call:
https://stackoverflow.com/questions/59146513/pyautogui-and-pyscreeze-crash-with-windll-user32-releasedc-failed
如对你有帮助,请点击采纳按钮~~