Is it possible to read text from another app?

Post your questions and help other users.

Moderator: Martin

Post Reply
Mgmcderm
Posts: 4
Joined: 09 Jan 2017 03:19

Is it possible to read text from another app?

Post by Mgmcderm » 10 Jan 2017 02:30

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.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

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

Post by Martin » 12 Jan 2017 21:09

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

Post Reply