Page 1 of 1

Is it possible to read text from another app?

Posted: 10 Jan 2017 02:30
by Mgmcderm
I have created a flow to start and stop ride recording w/ Strava. When I finish a ride, the Strava app displays distance, time, and average speed. Can I read these fields and have automagic convert to speech?

I see a way to control a UI, but not to read from a UI.

Thanks.

Re: Is it possible to read text from another app?

Posted: 12 Jan 2017 21:09
by Martin
Hi,

You can try to use action Control UI with functions getText or getTextInActiveWindow, for example:

Code: Select all

text = getText(100, 200);
(100, 200 are the x/y coordinate of the element and need to be adjusted to match the UI of the Strava app)

Alternatively you could extract the entire text displayed by Strava and the extract the data using string operations:

Code: Select all

text = getTextInActiveWindow();
Regards,
Martin