1

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?

2 Answers2

1

Pyautogui looks the screen from a user's perspective. So anything you cant see as a user, won't be seen by pyautogui too. And by the time you switch on your monitor back it would have moved to FAILSAFE mode.

0

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.

viriatis
  • 1
  • 1