Lua语言_读取文本指定行内容
发布于 2020-04-26
function QMPlugin.ReadLine(FileName, LineNum) local LineContent = "" pcall( function() local curLineNum = 0 io.input(FileName) while true do...
阅读(1425)赞 (1)

老马黑科技发布于 2020-04-26
function QMPlugin.ReadLine(FileName, LineNum) local LineContent = "" pcall( function() local curLineNum = 0 io.input(FileName) while true do...
阅读(1425)赞 (1)
发布于 2020-04-26
function QMPlugin.Bytes(FileName) local size = 0 pcall( function() local f = io.open(FileName, "r") if f == null then return null end size =...
阅读(1485)赞 (0)
发布于 2020-04-26
function QMPlugin.Length(FileName) local fileLength = 0 pcall( function() io.input(FileName) local ReadContent = io.read("*a") local strCont...
阅读(1391)赞 (0)
发布于 2020-04-26
function QMPlugin.WriteLines(FileName, Lines) pcall( function() io.output(FileName) for i, v in ipairs(Lines) do io.write(tostring(v), '\r\n...
阅读(1307)赞 (0)
发布于 2020-04-26
function QMPlugin.WriteLine(path,line,str) local t={} f = io.open(path,"r") for i in f:lines() do table.insert(t,i) end table.insert(t,line,...
阅读(1454)赞 (0)
发布于 2020-04-26
function QMPlugin.Write(FileName, ...) local arg={...} pcall( function() io.output(FileName) for i, v in ipairs(arg) do io.write(tostring(v)...
阅读(1397)赞 (0)
发布于 2020-04-26
function QMPlugin.LinesNumber(FileName) local LinesAllNum = 0 pcall( function() io.input(FileName) while true do local ReadContent = io.read...
阅读(1630)赞 (4)
发布于 2020-04-26
function QMPlugin.Append(FileName, ...) local arg={...} pcall( function() local f = io.open(FileName, "a") if f == null then return false en...
阅读(1843)赞 (0)
发布于 2020-04-26
--查询表 function QMPlugin.SQLSelect(DBpath, tbl, field, where) local result = {} local sql local sqlite3 = require("sqlite3") field = field or...
阅读(1153)赞 (0)
发布于 2020-04-26
办法1 //判断返回 Function 返回(arr) For 3 Randelay() If 找图判断(arr) = true Then TracePrint "返回成功" Exit For Else TracePrint "继续返回" KeyPress "back" End ...
阅读(1264)赞 (0)