2

I just started learning script lua. I have a .txt file with the format "user | pass". how to get "user" and "pass" on the first line and delete them from that file. This is my command but I can only read the contents of one line, but I can't separate "user" and "pass"

io.input("/var/mobile/Library/AutoTouch/Scripts/account.txt")
t = {}
for i = 1, math.huge do
    local s = io.read()
if s == nil then
break
end
    t[#t + 1] = s
end

i = 1, #t do alert(t[i]); end

0 Answers0