使用ADB在Android上粘贴文本? [英] Paste text on Android using ADB?
本文介绍了使用ADB在Android上粘贴文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这似乎是一个重复的问题,但请听我说。
This might seem like a duplicate question, but hear me out.
我基本上需要在Android内部按 CTRL + V。我需要将当前的Android剪贴板粘贴到重点突出的TextBox中。
I basically need to press "CTRL+V" inside of Android. I need to paste the current Android clipboard into the focused TextBox.
因此,此操作:
adb shell input text [text]
不会,因为这需要我自己输入文字。我只需要粘贴当前剪贴板。
won't do, as it requires me to enter the text myself. I just need to paste the current clipboard.
通过ABD可以吗?我在谷歌上搜索,发现的只是设置剪贴板内容的方法,而不仅仅是按下粘贴按钮。
Is that possible through ABD? I googled and googled and all I found was ways to set clipboard content and not actually just press the paste button.
为了简化开发
推荐答案
我的解决方案:
- 我安装了Tasker插件。
- 我用按钮做了一个场景。
- 在按钮点击事件上,我添加了 Control + V插件,其配置键入
%CLIP
。 - 现在,我制作了一个配置文件,该配置文件可直接用于显示场景的任务(
- 最后但同样重要的是,我使用
adb shell输入tap xy
来点击按钮。
- I installed the Tasker plugin.
- I made a "scene" with a button.
- On the button tap event I added the "Control+V plugin" with the configuration to type
%CLIP
. - Now I made a profile that direct to a task to show the scene (overlay,blocking).
- And last but not least, I use
adb shell input tap x y
to tap the button.
这篇关于使用ADB在Android上粘贴文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文