Lua语言_读取文本指定行内容
发布于 2020-04-26
function QMPlugin.ReadLine(FileName, LineNum) local LineContent = "" pcall( function() local curLineNum = 0 io.input(FileName) while true do...
阅读(1366)赞 (1)
发布于 2020-04-26
function QMPlugin.ReadLine(FileName, LineNum) local LineContent = "" pcall( function() local curLineNum = 0 io.input(FileName) while true do...
阅读(1366)赞 (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 =...
阅读(1426)赞 (0)
发布于 2020-04-26
function QMPlugin.Length(FileName) local fileLength = 0 pcall( function() io.input(FileName) local ReadContent = io.read("*a") local strCont...
阅读(1316)赞 (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...
阅读(1250)赞 (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,...
阅读(1386)赞 (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)...
阅读(1321)赞 (0)
发布于 2020-04-26
function QMPlugin.LinesNumber(FileName) local LinesAllNum = 0 pcall( function() io.input(FileName) while true do local ReadContent = io.read...
阅读(1546)赞 (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...
阅读(1793)赞 (0)
发布于 2020-04-26
--查询表 function QMPlugin.SQLSelect(DBpath, tbl, field, where) local result = {} local sql local sqlite3 = require("sqlite3") field = field or...
阅读(1111)赞 (0)
发布于 2020-04-26
办法1 //判断返回 Function 返回(arr) For 3 Randelay() If 找图判断(arr) = true Then TracePrint "返回成功" Exit For Else TracePrint "继续返回" KeyPress "back" End ...
阅读(1216)赞 (0)