Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- args = {...}
- if #args == 0 then
- CodeName = "startup.lua"
- print("FILE?")
- FILE = read()
- else
- FILE = args[1]
- end
- if fs.exists(FILE) then
- else
- print("File does not exist, create new file?")
- print("Y/N")
- if string.upper(read()) == "Y" then
- fs.copy(CodeName,FILE)
- end
- end
- while true do
- sleep(1)
- term.setBackgroundColor(colors.gray)
- term.setTextColor(colors.black)
- term.clear()
- term.setBackgroundColor(colors.blue)
- term.setCursorPos(1,1)
- term.clearLine()
- term.write("ANO V1 "..FILE.." LOADING")
- term.setBackgroundColor(colors.gray)
- stream = fs.open(FILE,"r")
- sleep(1)
- i = 0
- j = 0
- while true do
- i = i + 1
- j = j + 1
- if j == 15 then
- j = 1
- read()
- term.clear()
- end
- term.setCursorPos(1,1)
- term.setBackgroundColor(colors.lime)
- term.clearLine()
- term.write("ANO V1 "..FILE.." LINE:"..i.." DEBUG:"..j)
- term.setBackgroundColor(colors.gray)
- term.setCursorPos(1,j+1)
- T = stream.readLine()
- if T == nil then
- break
- else
- print(T)
- sleep(0)
- end
- end
- term.setBackgroundColor(colors.red)
- print("END OF FILE")
- term.setBackgroundColor(colors.gray)
- print("EDIT? [Y/N]")
- if string.upper(read()) == "Y" then
- shell.run("edit", FILE)
- else
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setTextColor(colors.yellow)
- term.setCursorPos(1,1)
- print("Goodbye!")
- break
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement