Answer the question
In order to leave comments, you need to log in
How to write a python script that will take a screenshot of certain parts of the screen?
I connect the phone to the computer so that the image from the phone is transferred to the computer screen. I need the python script to take a screenshot of the screen at the right time for me, so that later I can use tesseract to recognize the text that is on the screenshot, so that I can google it later (the question appears on the phone, and will also be present on the screenshot). Further, through the custom search API, I will find out which of the answers suggested in the screenshot is more suitable as an answer to my question. But everything depends on creating a screenshot in the place I need on the monitor screen. Who can help create the script?
Answer the question
In order to leave comments, you need to log in
Again, some kind of crutch solution - probably a python script could connect to the phone itself and get a picture from it, regardless of the screenshot.
You can take a screenshot on the device via adb:
adb shell screencap -p /sdcard/screen.png
adb pull /sdcard/screen.png
adb shell rm /sdcard/screen.png
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question