lua 函数初识(五)

来源:互联网 发布:淘宝直通车官网申请 编辑:程序博客网 时间:2024/04/27 23:58

getNetTime() 获取网络时间从1970年到现在

eg:time=getNetTime() day=os.date("%Y/%m/%d %X",time)

writePasteboard(string) 写入粘贴板 readPasteboard() 读取粘贴板

eg:writePasteboard("a lucky dog") content=readPasteboard()

getTSVer() 获取ts的版本号 getOSVer() 获取操作系统的版本号

eg:ver=getTSVer() ver=getOSVer()

frontAppBid() 获取前台进程的包名

eg:bid=frontAppBid()

luaExitIfCall(Flag) 当有来电时结束脚本

eg:luaExitIfCall(true)

catchTouchPoint() 获取用户点击的坐标

eg:x,y=catchTouchPoint()

appBundlePath(bid) 获取应用安装的路径

eg:appPath = appBundlePath("com.taptap")


原创粉丝点击