abd命令 之 按键精灵 lua: huiyitool.lua

**function QMPlugin.randoms(x,y) --输出随机数字,x,最小值,y 最大值
local a
a=math.random(x,y)
return a
end
function QMPlugin.Letter() --随机输出字母,小写字母,按键不是有格式:UCase(字符串表达式) 函数么,转大写用他
local zm = {“a”,“b”,“c”,“d”,“e”,“f”,“g”,“h”,“i”,“j”,“k”,“l”,“m”,“n”,“o”,“p”,“q”,“r”,“s”,“t”,“u”,“v”,“w”,“x”,“y”,“z”}
local a
a = zm[math.random(1,26)]
return a
end
function QMPlugin.Visit(str) --使用默认浏览器 访问指定网址 str 填写你想要访问的网址
os.execute("am start -a android.intent.action.VIEW -d "…str)
–string.format(“am start -a android.intent.action.VIEW -d %s/”,str)
end
function QMPlugin.Shutdown() --关机
os.execute(“reboot -p”)
end
function QMPlugin.Restart() --重启
os.execute(“reboot”)
end
function QMPlugin.Close3g() --关闭流量
os.execute(“svc data disable”)

end
function QMPlugin.Open3g() --开启流量
os.execute(“svc data enable”)
end
function QMPlugin.Openwifi() --开启wifi
os.execute(“svc wifi enable”)
end
function QMPlugin.Closewifi() --关闭wifi
os.execute(“svc wifi disable”)
end
function QMPlugin.duanxin() --发送短信 hello 替换成你要说的话 --发送这个按钮只能你们自己来了
os.execute(“am start -a android.intent.action.SENDTO -d sms:10001 --es sms_body hello --ez exit_on_sent true”)
end
function QMPlugin.Deletefiles(str) --文件夹删除 如删除文件夹123 输入 123
os.execute(“rm -r /mnt/sdcard/”…str)
end
function QMPlugin.Deletefile(str) --文件删除 如123.txt
os.execute(“rm /mnt/sdcard/”…str)
end
–service call phone 2 s16 “10086”(呼叫的号码)
调用例子:
PutAttachment "/sdcard/MobileAnjian/plugin/ ", “huiyitool.lua” '添加到附件然后释放
import “huiyitool.lua” '非官方的插件必须要调用才能使用
huiyitool.Openwifi() '开启wifi**

猜你喜欢

转载自blog.csdn.net/Memroy/article/details/89451365
LUA