laptob监视器显示关闭时,python pyautogui模块不起作用 [英] python pyautogui module does not work when laptob monitor display is off

查看:482
本文介绍了laptob监视器显示关闭时,python pyautogui模块不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不幸的是,当我的显示器关闭后,pyautogui无法正常工作。当我关闭显示器时,我希望它能正常工作。我该怎么解决?

unfortunately pyautogui does not work when my monitor display is off. I want it to work correctly when I turn my monitor off. How can I solve it?

推荐答案

我遇到了同样的问题。我使用 vncdotool 解决了该问题。我要使用的远程计算机正在运行x11vnc服务器。我使用vncdotool作为客户端来连接它。您可以捕获屏幕。我使用它来映射使用cv2模块所需的所有屏幕按钮。要在屏幕上找到按钮在较大图像内查找图像位置 ,裁剪如何裁剪图像并比较两者找到的按钮的原始按钮,如果比较%足够好(对我来说小于2%),则可以信任。

I had the same problem. I worked it around using vncdotool. the remote machine I want to work with has x11vnc server running. I use vncdotool as a client to connect to it. you can capture the screen. I used this to map all the screen buttons I needed using cv2 module. To find the button on the screenFind location of image inside bigger image, crop it how to crop image and compare both original button to the one finded, if the comparisson % is good enought (for me less that 2%), it is trustable.

这篇关于laptob监视器显示关闭时,python pyautogui模块不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆