-1
I would like to be able to make a screenshot of the application running in the background with Python. On each screen the application enters, I need a print. I managed to, with the pyautogui. But, it only takes screenshot of the main screen, when I leave the application running in the background, I only get the screenshots of the screen I’m on and not the application that is running.
nomeArquivo = datetime.datetime.now().strftime('%Y-%M-%d_%H%M%S' + '.png') #nome e formato do arquivo.
foto = pyautogui.screenshot() #foto sendo salva.
foto.save('C:\ProjetosPython\Testes\Evidências/' + nomeArquivo) #caminho onde salvo a foto.```
Jasar Orion thank you! But, it hasn’t worked yet.
– William
strange did the tests here on my pc and function ( I did before posting ). so much so that I have a monitoring system that runs something similar and works
– Jasar Orion
I’ll do a little research to see if I can help you better
– Jasar Orion
Thank you for your help and attention!
– William
there is one thing I forgot: it cannot be in crontab running as root. it has to be in the user where the X session is active. I just hate it here.
– Jasar Orion
Thanks, I got.
– William
which of the methods you used? mark as solved after
– Jasar Orion
I used the second alternative
scrot
– William
good. how to use Raspberry does not have the scrot for her. hence I have to do in the rsss hand.
– Jasar Orion