Action: Read Screenshot Contents (no input variable?)

HCC

Member
Hello,

Normally an OCR recognition module needs a path to know which screenshot
file the module should read from, e.g a path like this :

/storage/emulated/0/Pictures/Screenshots/20240330-155845.png

But the Macrodroid action"Read Screenshot Contents" has no option to specify a fixed
path (or variable) to the input file.

-How does the Macrodroid OCR module know which screenshot file it has to read?
 

HCC

Member
Ok, very helpful, thank you.
Is there a visible sign on the phone screen (or a sound) when MD takes the screenshot?
 

HCC

Member
-I'm asking because the output array variable is always empty when trying the
"Read Screenshot Contents" action (the Macrodroid log file shows no errors and the MD Helper log is empty).

My device is:
Nokia 6.1 / Android 13

Permissions Allowed on Macrodroid 5.43.6 Pro:
Calendar, Call logs, Camera, Contacts, Location, Microphone,
Music and audio, Nearby devices, Notifications, Photos and videos, Physical activity

Permissions Allowed (Macrodroid Helper 1.14):
Files, Location, Music and audio, Nearby devices, Notifications, Phone, Photos and videos
 
Last edited:

HCC

Member
It takes the screenshot then reads from that.
To use e.g. the "Take Screenshot" action the smartphone must be rooted.
-Does the device need to be rooted for the "Read Screenshot Contents" action to work?

I don't use a rooted device.
 

dhj49er

Well-known member
To use e.g. the "Take Screenshot" action the smartphone must be rooted.
-Does the device need to be rooted for the "Read Screenshot Contents" action to work?

I don't use a rooted device.
Read screenshot contents works without root.

Make sure you allow time for the action to complete before continuing the macro ie add a wait after it, if you haven't already.
 

Attachments

  • Screenshot_20240407-100635.png
    Screenshot_20240407-100635.png
    82.2 KB · Views: 4
Last edited:

Endercraft

Moderator (& bug finder :D)
Read screenshot contents works without root.
The screenshot action on old devices requires root, it's not the case anymore though.
Make sure you allow time for the action to complete before continuing the macro ie add a wait after it, if you haven't already.
I'm not sure for this specific action but most of the time the macro will block until the action is done.
 

dhj49er

Well-known member
The screenshot action on old devices requires root, it's not the case anymore though.

I'm not sure for this specific action but most of the time the macro will block until the action is done.
I've just checked with no wait after the Read screenshot action and it still works fine.

So I think you are right.

Thank you for pointing this out.
 

HCC

Member
My device here is: Nokia 6.1 / Android 13

Permissions Allowed on Macrodroid 5.43.6 Pro:
Calendar, Call logs, Camera, Contacts, Location, Microphone,
Music and audio, Nearby devices, Notifications, Photos and videos, Physical activity

I tried it with different texts on the cell phone screen like browser, file browser,
X-plore, Macrodroid etc. - The Macrodroid log file always shows no errors
and the output array variable "temp" is always empty 🤔 .
 

Attachments

  • BFV.png
    BFV.png
    14.1 KB · Views: 4
  • Read-Screenshot-Test.jpg
    Read-Screenshot-Test.jpg
    28.1 KB · Views: 4
Last edited:
Top