在编个自动化的小程序,需要判断屏幕某点颜色,发现pyautogui.pixel() 及 pyautogui.pixelMatchesColor()不能正常工作,
总是出错。实在不明白。这是为什么?怎么解决?

请教一个问题。pyautogui.pixel 及 pyautogui.pixelMatchesColor为什么用不了?
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
2条回答 默认 最新
- CSDN专家-HGJ 2021-10-26 19:38关注
这是一个软件版本运行中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如对你有帮助,请点击采纳按钮~~
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 1无用