Control UI: paste a variable?

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
tsolignani
Posts: 187
Joined: 12 Jan 2019 11:53
Location: Vignola, Mo, Italy
Contact:

Control UI: paste a variable?

Post by tsolignani » 13 Sep 2019 19:35

Good evening everyone.

Is there a way to "paste" a variable into the current text box without having to change the system clipboard?

Of course, I cannot use setText2byID for I cannot know the name of the text box.

Thank you.

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

Re: Control UI: paste a variable?

Post by Rafi4 » 14 Sep 2019 00:31

Hi
Use "show control ui infos" action to know the id.
To paste text use action "copy text to clipboard" and then use control ui action function is
paste ()

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

User avatar
tsolignani
Posts: 187
Joined: 12 Jan 2019 11:53
Location: Vignola, Mo, Italy
Contact:

Re: Control UI: paste a variable?

Post by tsolignani » 14 Sep 2019 13:24

Thank you, but in many apps you cannot get to know the ID of the element.

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: Control UI: paste a variable?

Post by anuraag » 15 Sep 2019 13:41

sendText(text) will work. You will need to enable Automagic keyboard first to get it work.

User avatar
tsolignani
Posts: 187
Joined: 12 Jan 2019 11:53
Location: Vignola, Mo, Italy
Contact:

Re: Control UI: paste a variable?

Post by tsolignani » 15 Sep 2019 15:00

I'll try that, thank you.

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

Re: Control UI: paste a variable?

Post by Desmanto » 27 Sep 2019 17:40

For universal paste, you have to use system clipboard.

It seems you try to avoid changing the system clipboard because it will trigger your other clipboard flow. If that is the case, you have 2 workaround. At mine, I have added condition checking the flow is running. So my clipboard manager flow will check if the CUI paste flow is running, the flow won't continue to the main branch. Hence, the pasted clipboard won't change my clipboard buffer.

The other method is temporary disable the flow with clipboard changed trigger, set the clipboard, then enabel the flows again. However, if you use multiple flow with the clipboard changed trigger, it is not convenient to do it.
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.

Post Reply