hoibo 发表于 2023-3-1 18:57:50

输入关键字,能上下翻页去查找这个关键字。

第1个编辑框是输入名称。第2个编辑框输入页数,默认是20。下面有两个按钮往上查找,还是往下查找。点击后就会生成指令。确定后会查找对应关键字查找到会会点击进入。



来自解说社区客户端

hoibo 发表于 2023-3-1 18:58:48

require "import"
import "android.widget.*"
import "com.androlua.*"
layout=
{
LinearLayout,
orientation=1,
layout_width=1,
layout_height=1,
{LinearLayout,
layout_width=-1,
layout_height=-1,
layout_weight=1,
{
TextView,
text="名称",
layout_width="30%w",
layout_height="10%h",
layout_weight=1,
},
{
EditText,
id="edit",
layout_width="70%w",
layout_height="10%h",
layout_weight=1,
},
},
{LinearLayout,
layout_width=-1,
layout_height=-1,
layout_weight=1,
{
TextView,
text="页数",
layout_width="30%w",
layout_height="10%h",
layout_weight=1,},
{
EditText,
text="20",
id="edit2",
layout_width="70%w",
layout_height="10%h",
layout_weight=1,
InputType="number"
},
},
{LinearLayout,
layout_width=-1,
layout_height=-1,
layout_weight=1,
{
Button,
text="向上查找",
onClick="xscz",
layout_width=-1,
layout_height="10%h",
layout_weight=1,
},
{Button,
text="向下查找",
onClick="xxcz",
layout_width=-1,
layout_height="10%h",
layout_weight=1,},
},
}
dlg=LuaDialog()
.setView(loadlayout(layout))
.show()
function xxcz()
dlg.hide()
service.copy("!@#\n".."*"..edit.text.."*|%向下翻页>"..edit2.text.."$50")
end
function xscz()
dlg.hide()
service.copy("!@#\n".."*"..edit.text.."*|%向上翻页>"..edit2.text.."$50")
end



来自解说社区客户端
页: [1]
查看完整版本: 输入关键字,能上下翻页去查找这个关键字。