How to automate text extraction from your screen

Recently I got a continuous glucose monitor (CGM) because I’m a data geek but also because of my family’s history with diabetes.

I didn’t properly research the manufacturer and when I installed the app on my phone there was no automatic synchronisation with Apple Health, ok bummer, now and then I would open Apple Health and log the data myself.

That got old quick 😄

Then I figured out that Shortcuts can take screenshots and that there is a built in action to extract text from images.

Then I built this shortcut to:

  • open the CGM app
  • take a screenshot
  • crop the area with the reading
    • this is a bit of an annoying part that you have to figure out the coordinates with some trial and error if you’re not interested in the whole screen
  • open a dialog to confirm the value
  • and log it in Apple Health

There might be some other use cases out there and probably tons of ways of doing the same thing but that was my 10 minutes solution and I loved it.

Photo by Dimitri Karastelev on Unsplash

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.