Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function Clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- function Nav()
- Clear()
- print("please type file name or type exit")
- print("then press enter twice")
- term.setCursorPos(1,4)
- local input = read()
- repeat
- local event, key = os.pullEvent("key")
- if key ~= keys.enter then
- input = read()
- end
- until key == keys.enter
- local file = input
- if input == "exit" then
- shell.run(settings.get("os_DesktopLoc"))
- elseif fs.exists(file) == true then
- shell.run("paint",file)
- while true do
- Clear()
- print("press enter to continue")
- local event, key = os.pullEvent("key")
- if key == keys.enter then break end
- end
- Nav()
- else
- local Im = fs.open(file,"w")
- Im.close()
- shell.run("paint",file)
- while true do
- Clear()
- print("press enter to continue")
- local event, key = os.pullEvent("key")
- if key == keys.enter then break end
- end
- Nav()
- end
- end
- Nav()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement