Is it possible to copy a variable's content into the system clipboard while executing a control UI block, or do I have to split the block in two and use an automagic action in between?
Thank you.
copy a variable to the clipboard inside Control UI
Moderator: Martin
- tsolignani
- Posts: 187
- Joined: 12 Jan 2019 11:53
- Location: Vignola, Mo, Italy
- Contact:
Re: copy a variable to the clipboard inside Control UI
Yes, just parallel them. Let say your previous action is Script. Then just add Copy Text to clipboard, put the variable. From the same action script, add another control UI, do the CUI script you need. Both Copy text and CUI will execute at the same time (not exactly, but at the same execuiton step). If you mean to split is to have 2 action, then yes this is splitted into 2, action Copy Text to Clipboard and Control UI.
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.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
- tsolignani
- Posts: 187
- Joined: 12 Jan 2019 11:53
- Location: Vignola, Mo, Italy
- Contact:
Re: copy a variable to the clipboard inside Control UI
Thank you.
The control UI block has to paste from the clipboard, but, since there are many sleep points, the clipboard could get changed since the control UI block starting then ending into pasting the wrong text.
I wonder if I could put the command to copy a certain variable to the clipboard on a line inside the control UI block or if I have to create 3 blocks: first part control UI, copy variable to clipboard, second part control UI
Thank you.
The control UI block has to paste from the clipboard, but, since there are many sleep points, the clipboard could get changed since the control UI block starting then ending into pasting the wrong text.
I wonder if I could put the command to copy a certain variable to the clipboard on a line inside the control UI block or if I have to create 3 blocks: first part control UI, copy variable to clipboard, second part control UI
Thank you.
Re: copy a variable to the clipboard inside Control UI
If clipboard is necessary in the CUI script, then yes you have to split them. CUI > Copy to clipboard > CUI. Currently there is no function to copy from clipboard, you have to use the action.
But if it is possible, try to find a way if you can use setText2Byid() instead. It won't works on all cases, but maybe it works at that particular usage. setText2ById() will replace the whole element text, so you need to getTextById() first if you need to concatenate. In this case, paste() seems better solution.
But if it is possible, try to find a way if you can use setText2Byid() instead. It won't works on all cases, but maybe it works at that particular usage. setText2ById() will replace the whole element text, so you need to getTextById() first if you need to concatenate. In this case, paste() seems better solution.
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.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
- tsolignani
- Posts: 187
- Joined: 12 Jan 2019 11:53
- Location: Vignola, Mo, Italy
- Contact: