解说社区

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 334|回复: 1

[原创] 分享一个自己制作的插件——可自定义点击次数和频率的...

[复制链接]
发表于 2023-2-25 20:04:20 来自手机 | 显示全部楼层 |阅读模式
本帖最后由 hoibo 于 2023-3-21 14:26 编辑

打开后有三个编辑框。第1个编辑框输入你要点击控件的名称。不输入则对当前位置进行点击。第2个编辑框是点击次数。第3个编辑框是每次点击的间隔时间,这里以毫秒为单位。不输入默认是一百毫秒点击一次。然后点击确定它就会生成指令,再点确定就可以开始执行了。



  来自解说社区客户端
回复

使用道具 举报

 楼主| 发表于 2023-2-25 20:04:52 来自手机 | 显示全部楼层
本帖最后由 hoibo 于 2023-3-21 14:24 编辑

require "import"
import "android.widget.*"
import "com.androlua.*"
layout=
{
LinearLayout,
orientation=1,
layout_width=-1,
layout_height=-1,
{
LinearLayout,
orientation=1,
layout_width=-1,
layout_height=-1,
layout_weight=1,
{
EditText,
id="edit",
hint="名称(不输入将对当前焦点进行操作)",
layout_width=-1,
layout_height="10%h",
layout_weight=1,
},
{
EditText,
id="edit2",
hint="次数",
layout_width=-1,
layout_height="10%h",
layout_weight=1,
InputType="number"
},
{
EditText,
text="100",
id="edit3",
hint="时间(以毫秒为单位)",
layout_width=-1,
layout_height="10%h",
layout_weight=1,
InputType="number"
},
},
{
Button,
text="确定",
onClick="qd",
layout_width=-1,
layout_height="10%h",
layout_weight=1,
},
}
local a=service.getText(node)
dlg=LuaDialog()
.setView(loadlayout(layout))
.show()
function qd()
dlg.hide()
if edit.text==""
require "import"
import "android.graphics.Rect"
local p=Rect()
node.getBoundsInScreen(p)
service.copy("!@#复制文字自动执行\n".."["..string.format("%.0f,%.0f",(p.left+(p.right-p.left)/2),(p.top+(p.bottom-p.top)/2)).."]".."<"..edit2.text.."$"..edit3.text)
else
service.copy("!@#复制文字自动执行\n".."*"..edit.text.."*".."<"..edit2.text.."$"..edit3.text)
end
end
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|解说社区

GMT+8, 2024-5-6 14:51 , Processed in 0.041337 second(s), 13 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表