Copy text

Post your questions and help other users.

Moderator: Martin

Post Reply
Akt
Posts: 133
Joined: 25 May 2014 08:57

Copy text

Post by Akt » 15 Jul 2020 03:50

Hello

How to copy text from this message

I want to copy name and address
Attachments
20200715_091833.jpg
20200715_091833.jpg (46.97 KiB) Viewed 19151 times

User avatar
Rafi4
Posts: 281
Joined: 01 Dec 2017 05:23

Re: Copy text

Post by Rafi4 » 15 Jul 2020 08:16

Hi akt
Use control ui action to get text. Use control ui infos action to know the id of the name and address. Any doubts? Please post.

from record4
No.1 Automation app in play store Automagic Premium
Samsung Galaxy j2 non rooted.
Android 5.1.1

Akt
Posts: 133
Joined: 25 May 2014 08:57

Re: Copy text

Post by Akt » 15 Jul 2020 09:31

Hello

In control ui, which function to use

Akt
Posts: 133
Joined: 25 May 2014 08:57

Re: Copy text

Post by Akt » 16 Jul 2020 01:01

Please could you post a flow as I don't know how to write scripts.

User avatar
Rafi4
Posts: 281
Joined: 01 Dec 2017 05:23

Re: Copy text

Post by Rafi4 » 17 Jul 2020 03:00

Hi akt
Use show control ui infos action to get

Example as below for your understanding.
text = getTextById("com.android.chrome:id/url_bar");

Text contains the desired address.

Trigger = app task started (app name chrome)
Action = control ui script as

Code: Select all

sleep (5000);
text = getTextById("com.android.chrome:id/url_bar");
Use condition debug dialog to know more.

From record4
No.1 Automation app in play store Automagic Premium
Samsung Galaxy j2 non rooted.
Android 5.1.1

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Copy text

Post by Desmanto » 18 Jul 2020 16:33

@Akt : where is these text located? Inside app or a browser? If inside app, you can use Control UI as suggested by Rafi4. You cn check the tutorial here : viewtopic.php?f=6&t=7320

But if it is from browser, most of the time, you can't use Control UI to get the text. You can still try Control UI function getTextInActiveWindow() to see if it returns the text. If not, then you have to use HTTP request and parse the result using regex.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Akt
Posts: 133
Joined: 25 May 2014 08:57

Re: Copy text

Post by Akt » 03 Aug 2020 04:53

Thank you. Problem solved :D

Post Reply