Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Name: xPlore
- Creator: DannySMc (dannysmc95)
- Platform: Lua Virtual Machine
- Description:
- A new advanced file browser, xPlore uses a minimal design to provide advanced functionality. xPlore can offers a key term file searcher allowing you to search for characters and strings inside of file names, giving a list as a file or on-screen. Auto-refresh to files to make sure you have the updated list. Folder/File Creation. Move, copy and delete files/folders.
- Future:
- + An easy to use command line tool, writing content to a screen instead in a super minimal format.
- + Supports Turtles, Pocket Computers and Non-advanced computers.
- + CCSystems FTP file management.
- + CCSystems URL Browser, with a in-built HTML parser.
- ]]
- local tArgs = {...}
- xplore = {}
- xplore.__index = xplore
- xplore.draw = {}
- xplore.draw.__index = xplore.draw
- LoggedIn = false
- username = "Guest"
- password = nil
- pathurl = "/"
- -- URL/FTP/DIR
- pathtype = "DIR"
- tHistory = {
- "/",
- }
- nTries = 0
- function xplore.get()
- local ok, err = pcall( function()
- if http then
- if fs.exists("--") then
- os.loadAPI("--")
- else
- aa = aa or {}
- local a = http.get("http://api.dannysmc.com/files/apis/progutils.lua")
- a = a.readAll()
- local env = {}
- a = loadstring(a)
- local env = getfenv()
- setfenv(a,env)
- local status, err = pcall(a, unpack(aa))
- if (not status) and err then
- printError("Error loading api")
- return false
- end
- local returned = err
- env = env
- _G["snet"] = env
- end
- xplore.init()
- else
- xplore.error("HTTP needs to be enabled.")
- end
- end)
- if not ok then
- if nTries == 3 then
- print("The program has tried 3 times to get the API, We shall run shell instead.")
- sleep(5)
- shell.run("clear")
- shell.run("shell")
- else
- nTries = nTries + 1
- print("Program, failed to download API, Re-trying...")
- sleep(1)
- xplore.get()
- end
- end
- end
- function xplore.listall(start)
- local function yieldFsList(startPath)
- local list = fs.list(startPath)
- for _, file in ipairs(list) do
- local path = fs.combine(startPath, file)
- if fs.isDir(path) then
- yieldFsList(path)
- else
- coroutine.yield(path, file)
- end
- end
- end
- return coroutine.wrap(function() yieldFsList(start or "/") end)
- end
- function xplore.find()
- foundfiles = {{},{}}
- outputavailable = false
- col.screen("white")
- draw.box(1, 51, 1, 1, " ", "grey", "grey")
- draw.texta("Search", 1, 1, false, "cyan", "grey")
- count = 0
- draw.textc(" -< Search the file system for key word >-", 2, false, "lightGrey", "white")
- draw.texta("Search term:", 8, 7, false, "lightGrey", "white")
- draw.box(8, 36, 8, 1, " ", "cyan", "cyan")
- draw.box(1, 51, 19, 1, " ", "grey", "grey")
- draw.texta(" Search ", 3, 19, false, "blue", "lightGrey")
- draw.texta(" Exit ", 40, 19, false, "blue", "lightGrey")
- while true do
- local args = { os.pullEvent() }
- if args[1] == "mouse_click" and args[2] == 1 then
- if (args[3] >= 8 and args[3] <= 42) and (args[4] == 8) then
- draw.box(8, 36, 8, 1, " ", "cyan", "cyan")
- col.set("white", "cyan")
- term.setCursorPos(8, 8)
- write(": ")
- keyterm = tostring(read())
- count = 0
- elseif (args[3] >= 19 and args[3] <= 32) and (args[4] == 14) then
- if outputavailable then
- col.screen("white")
- draw.box(1, 51, 1, 1, " ", "grey", "grey")
- draw.texta("Search Results", 1, 1, false, "cyan", "grey")
- draw.box(1, 51, 19, 1, " ", "grey", "grey")
- draw.texta(" Exit ", 2, 19, false, "blue", "lightGrey")
- draw.textc(" File Name -> File Path ", 2, false, "lightGrey", "white")
- for i = 1, #tFiles[1] do
- draw.texta(tFiles[1][i].." -> "..tFiles[2][i], 1, i + 3, false, "grey", "white")
- end
- while true do
- local arg = { os.pullEvent() }
- if arg[1] == "mouse_click" and arg[2] == 1 then
- if (arg[3] >= 2 and arg[3] <= 7) and (arg[4] == 19) then
- xplore.find()
- end
- end
- end
- end
- elseif (args[3] >= 3 and args[3] <= 12) and (args[4] == 19) then
- -- Do search
- if not keyterm then
- draw.popup("Please enter a keyword to search")
- sleep(2)
- xplore.find()
- end
- jcount = 0
- for fullpath, filename in xplore.listall() do
- count = count + 1
- table.insert(foundfiles[1], filename)
- table.insert(foundfiles[2], fullpath)
- sleep(0)
- draw.textc(" Indexed "..count.." files", 10, false, "red", "white")
- end
- draw.textc(" Indexed "..count.." files", 10, false, "red", "white")
- tFiles = {{},{}}
- for i = 1, #foundfiles[1] do
- if foundfiles[1][i]:find(keyterm) then
- table.insert(tFiles[1], foundfiles[1][i])
- table.insert(tFiles[2], foundfiles[2][i])
- end
- end
- draw.textc(" Search completed, found "..#tFiles[1].." that match", 12, false, "red", "white")
- if #tFiles[1] >= 15 then
- local temp = fs.open("searchoutput", "w")
- temp.write(textutils.serialize(tFiles))
- temp.close()
- draw.textc(" Search results were > 15:", 14, false, "grey", "white")
- draw.textc(" Saved to '/searchoutput' ", 15, false, "grey", "white")
- else
- draw.texta(" View Results ", 19, 14, false, "white", "cyan")
- outputavailable = true
- assert(type(tFiles) == "table")
- end
- elseif (args[3] >= 40 and args[3] <= 49) and (args[4] == 19) then
- -- Exit
- xplore.main()
- end
- end
- end
- end
- function xplore.init()
- local ok, err = pcall(function()
- if term.isColour() then
- if fs.exists(".xPlore") then
- local settings = config.load(".xPlore")
- username = settings["username"]
- password = settings["password"]
- returnprog = settings["return"]
- end
- xplore.main()
- end
- end)
- if not ok then
- xplore.error(err)
- end
- end
- function xplore.getdir(pathurl)
- if pathurl:sub(1, 7) == "http://" then
- pathtype = "URL"
- -- Do online request
- elseif pathurl:sub(1, 6) == "ftp://" then
- -- Do FTP type of request using database
- pathtype = "FTP"
- else
- -- Load via local files
- pathtype = "DIR"
- local filelist = {{},{}}
- for _, v in ipairs(fs.list(pathurl)) do
- if fs.isDir(fs.combine(pathurl, v)) then
- table.insert(filelist[1], v)
- table.insert(filelist[2], "dir")
- end
- end
- for _, v in ipairs(fs.list(pathurl)) do
- if not fs.isDir(fs.combine(pathurl, v)) then
- table.insert(filelist[1], v)
- table.insert(filelist[2], "file")
- end
- end
- return filelist
- end
- end
- function xplore.bar(start)
- draw.box(1, 51, 1, 1, " ", "grey", "grey")
- --draw.box(5, 41, 1, 1, false, "lightGrey", "lightGrey")
- if pathurl:len() >= 38 then
- pathfix = "..."..pathurl:sub(pathurl:len() - 35)
- else
- pathfix = pathurl
- end
- draw.texta(pathfix, 3, 1, false, "lightBlue", "grey")
- draw.texta("<", 1, 1, false, "lime", "grey")
- draw.texta("X", 51, 1, false, "lime", "grey")
- draw.texta("["..pathtype.."]", 45, 1, false, "lightGrey", "grey")
- xplore.menu(start)
- draw.texta("Create", 41, 3, false, "lime", "cyan")
- draw.texta("----------", 41, 4, false, "lime", "cyan")
- draw.texta("Folder", 42, 5, false, "white", "cyan")
- draw.texta("File", 42, 6, false, "white", "cyan")
- draw.texta("Download", 41, 8, false, "lime", "cyan")
- draw.texta("----------", 41, 9, false, "lime", "cyan")
- draw.texta("Pastebin", 42, 10, false, "white", "cyan")
- draw.texta("URL", 42, 11, false, "white", "cyan")
- draw.texta("Functions", 41, 13, false, "lime", "cyan")
- draw.texta("----------", 41, 14, false, "lime", "cyan")
- draw.texta("Search", 42, 15, false, "white", "cyan")
- end
- function xplore.menu(start)
- if start then
- draw.box(51, 1, 2, 18, " ", "cyan", "cyan")
- sleep(0.05)
- draw.box(50, 1, 2, 18, " ", "cyan", "cyan")
- sleep(0.05)
- draw.box(49, 1, 2, 18, " ", "cyan", "cyan")
- sleep(0.05)
- draw.box(48, 1, 2, 18, " ", "cyan", "cyan")
- sleep(0.05)
- draw.box(47, 1, 2, 18, " ", "cyan", "cyan")
- sleep(0.05)
- draw.box(46, 1, 2, 18, " ", "cyan", "cyan")
- sleep(0.05)
- draw.box(45, 1, 2, 18, " ", "cyan", "cyan")
- sleep(0.05)
- draw.box(44, 1, 2, 18, " ", "cyan", "cyan")
- sleep(0.05)
- draw.box(43, 1, 2, 18, " ", "cyan", "cyan")
- sleep(0.05)
- draw.box(42, 1, 2, 18, " ", "cyan", "cyan")
- sleep(0.05)
- draw.box(41, 1, 2, 18, " ", "cyan", "cyan")
- sleep(0.05)
- draw.box(40, 1, 2, 18, " ", "cyan", "cyan")
- else
- draw.box(51, 1, 2, 18, " ", "cyan", "cyan")
- draw.box(50, 1, 2, 18, " ", "cyan", "cyan")
- draw.box(49, 1, 2, 18, " ", "cyan", "cyan")
- draw.box(48, 1, 2, 18, " ", "cyan", "cyan")
- draw.box(47, 1, 2, 18, " ", "cyan", "cyan")
- draw.box(46, 1, 2, 18, " ", "cyan", "cyan")
- draw.box(45, 1, 2, 18, " ", "cyan", "cyan")
- draw.box(44, 1, 2, 18, " ", "cyan", "cyan")
- draw.box(43, 1, 2, 18, " ", "cyan", "cyan")
- draw.box(42, 1, 2, 18, " ", "cyan", "cyan")
- draw.box(41, 1, 2, 18, " ", "cyan", "cyan")
- draw.box(40, 1, 2, 18, " ", "cyan", "cyan")
- end
- end
- function xplore.scrollbar(fileslen, scroll)
- draw.box(1, 1, 2, 18, false, "grey", "grey")
- draw.texta("^", 1, 2, false, "white", "grey")
- draw.texta("v", 1, 19, false, "white", "grey")
- size = math.ceil(fileslen / 16)
- pos = 2 + math.ceil(scroll + fileslen / 16)
- draw.box(1, 1, pos, size, " ", "lightGrey", "lightGrey")
- end
- function xplore.drawdir(files, scroll, start)
- if not start then
- for i = 2, 39 do
- draw.box(i, 1, 2, 19, " ", "white", "white")
- end
- for i = 1, 17 do
- j = i
- i = i + scroll
- if i <= #files[1] then
- if files[1][i]:len() >= 35 then
- name = files[1][i]:sub(1,32).."..."
- else
- name = files[1][i]
- end
- if files[2][i] == "dir" then
- draw.texta(name, 3, j+2, false, "orange", "white")
- elseif files[2][i] == "file" then
- draw.texta(name, 3, j+2, false, "lightBlue", "white")
- end
- else
- break
- end
- end
- else
- for i = 2, 39 do
- draw.box(i, 1, 2, 19, " ", "white", "white")
- end
- for i = 1, 17 do
- j = i
- i = i + scroll
- if i <= #files[1] then
- if files[1][i]:len() >= 35 then
- name = files[1][i]:sub(1,32).."..."
- else
- name = files[1][i]
- end
- if files[2][i] == "dir" then
- draw.texta(name, 3, j+2, false, "orange", "white")
- elseif files[2][i] == "file" then
- draw.texta(name, 3, j+2, false, "lightBlue", "white")
- end
- else
- break
- end
- sleep(0.05)
- end
- end
- xplore.scrollbar(#files, scroll)
- end
- function xplore.popup(question)
- draw.box(5, 43, 8, 3, " ", "grey", "grey")
- draw.box(5, 43, 9, 1, " ", "grey", "grey")
- draw.textc(" "..question, 8, false, "white", "grey")
- draw.texta(" Accept ", 7, 10, false, "blue", "lightGrey")
- draw.texta(" Decline ", 31, 10, false, "blue", "lightGrey")
- while true do
- local args = { os.pullEvent() }
- if args[1] == "mouse_click" and args[2] == 1 then
- if (args[3] >= 7 and args[3] <= 21) and (args[4] == 10) then
- return true
- elseif (args[3] >= 31 and args[3] <= 46) and (args[4] == 10) then
- return false
- end
- elseif args[1] == "char" then
- if args[2] == "1" then
- return true
- elseif args[2] == "2" then
- return false
- end
- end
- end
- end
- function xplore.main()
- scroll = 0
- col.screen("white", "white")
- xplore.bar(true)
- files = xplore.getdir(pathurl)
- assert(type(files) == "table")
- xplore.drawdir(files, scroll, true)
- os.startTimer(1.5)
- while true do
- local args = { os.pullEvent() }
- if args[1] == "timer" then
- files = xplore.getdir(pathurl)
- xplore.drawdir(files, scroll, false)
- os.startTimer(1.5)
- elseif args[1] == "mouse_click" then
- if args[2] == 1 then
- if args[3] == 51 and args[4] == 1 then
- local shalldo = xplore.popup("Exit xPlore?")
- if shalldo then
- col.screen("black")
- term.setCursorPos(1, 1)
- shell.run("shell")
- else
- xplore.bar()
- files = xplore.getdir(pathurl)
- scroll = 0
- xplore.drawdir(files, scroll, true)
- os.startTimer(1.5)
- end
- elseif (args[3] >= 3 and args[3] <= 40) and (args[4] >= 3 and args[4] <= 18) then
- if files[2][args[4] + scroll - 2] == "dir" then
- pathurl = pathurl..""..files[1][args[4] + scroll - 2].."/"
- table.insert(tHistory, pathurl)
- xplore.bar()
- files = xplore.getdir(pathurl)
- scroll = 0
- xplore.drawdir(files, scroll, true)
- os.startTimer(1.5)
- elseif files[2][args[4] + scroll - 2] == "file" then
- local shalldo = xplore.popup("Do you wish to run this file?")
- if shalldo then
- col.screen("black")
- term.setCursorPos(1, 1)
- shell.run(fs.combine(pathurl, files[1][args[4] + scroll - 2]))
- end
- col.screen("white", "white")
- xplore.bar()
- files = xplore.getdir(pathurl)
- scroll = 0
- xplore.drawdir(files, scroll, false)
- os.startTimer(1.5)
- end
- elseif args[3] == 1 and args[4] == 1 then
- if #tHistory > 1 then
- table.remove(tHistory, #tHistory)
- pathurl = tHistory[#tHistory]
- xplore.bar()
- files = xplore.getdir(pathurl)
- scroll = 0
- xplore.drawdir(files, scroll, true)
- os.startTimer(1.5)
- end
- elseif (args[3] >= 41 and args[3] <= 50) then
- if args[4] == 5 then
- -- Create Folder
- local nameinput = xplore.input("Folder name:")
- if nameinput:find("/") then
- draw.popup("Please do not add a '/'; this is automatic")
- sleep(1)
- xplore.main()
- else
- fs.makeDir(fs.combine(pathurl, nameinput))
- col.screen("white", "white")
- xplore.bar()
- files = xplore.getdir(pathurl)
- scroll = 0
- xplore.drawdir(files, scroll, false)
- os.startTimer(1.5)
- end
- elseif args[4] == 6 then
- -- Create Empty File
- local nameinput = xplore.input("File name:")
- if nameinput:find("/") then
- draw.popup("Please do not add a '/'; this is automatic")
- sleep(1)
- xplore.main()
- else
- local temp = fs.open(fs.combine(pathurl, nameinput), "w")
- temp.write(" ")
- temp.close()
- col.screen("white", "white")
- xplore.bar()
- files = xplore.getdir(pathurl)
- scroll = 0
- xplore.drawdir(files, scroll, false)
- os.startTimer(1.5)
- end
- elseif args[4] == 10 then
- -- Download File (Pastebin)
- local pastecode = xplore.input("Pastebin code (8 chars):")
- local filename = xplore.input("Save as:")
- if pastecode:len() == 8 then
- shell.run("pastebin get "..pastecode.." "..fs.combine(pathurl, filename))
- xplore.bar()
- files = xplore.getdir(pathurl)
- scroll = 0
- xplore.drawdir(files, scroll, false)
- os.startTimer(1.5)
- else
- draw.popup("A pastebin code has 8 characters")
- sleep(1)
- xplore.main()
- end
- elseif args[4] == 11 then
- -- Download File (URL)
- local urlcode = xplore.input("URL code:")
- local filename = xplore.input("Save as:")
- req = http.get(urlcode)
- if req then
- req = req.readAll()
- local temp = fs.open(fs.combine(pathurl, filename), "w")
- temp.write(req)
- temp.close()
- draw.popup("Downloaded...")
- sleep(1.5)
- xplore.bar()
- files = xplore.getdir(pathurl)
- scroll = 0
- xplore.drawdir(files, scroll, false)
- os.startTimer(1.5)
- else
- draw.popup("Failed to download file...")
- sleep(1.5)
- xplore.bar()
- files = xplore.getdir(pathurl)
- scroll = 0
- xplore.drawdir(files, scroll, false)
- os.startTimer(1.5)
- end
- elseif args[4] == 15 then
- -- Search Files
- xplore.find()
- end
- end
- elseif args[2] == 2 then
- if (args[3] >= 3 and args[3] <= 40) and (args[4] >= 3 and args[4] <= 18) then
- if args[4] + scroll - 2 <= #files[1] then
- local command = xplore.filemenu(fs.combine(pathurl, files[1][args[4] + scroll - 2]), files[2][args[4] + scroll - 2], pathurl)
- xplore.bar()
- files = xplore.getdir(pathurl)
- scroll = 0
- xplore.drawdir(files, scroll, false)
- os.startTimer(1.5)
- else
- local command = xplore.filemenu("nil", "nil", pathurl)
- xplore.bar()
- files = xplore.getdir(pathurl)
- scroll = 0
- xplore.drawdir(files, scroll, false)
- os.startTimer(1.5)
- end
- end
- end
- elseif args[1] == "mouse_scroll" then
- if args[2] == -1 then
- -- Scroll up
- if scroll > 0 then
- scroll = scroll - 1
- xplore.drawdir(files, scroll)
- end
- elseif args[2] == 1 then
- -- Scroll down
- if scroll < #files[1] - 16 then
- scroll = scroll + 1
- xplore.drawdir(files, scroll)
- end
- end
- end
- end
- end
- function xplore.filemenu(filepath, filetype, pathdata)
- if filetype == "dir" then
- draw.texta(" Options: ", 17, 6, false, "lime", "cyan")
- sleep(0.05)
- draw.texta(" -------- ", 17, 7, false, "lime", "cyan")
- sleep(0.05)
- draw.texta(" Rename ", 17, 8, false, "white", "cyan")
- sleep(0.05)
- if datacopied then
- draw.texta(" Paste ", 17, 9, false, "white", "cyan")
- else
- draw.texta(" Copy ", 17, 9, false, "white", "cyan")
- end
- sleep(0.05)
- draw.texta(" Delete ", 17, 10, false, "white", "cyan")
- while true do
- local args = { os.pullEvent("mouse_click") }
- if args[2] == 1 then
- if (args[3] >= 17 and args[3] <= 26) then
- if args[4] == 8 then
- -- Move folder
- local newpath = xplore.input("New folder name:")
- fs.move(filepath, newpath)
- draw.popup("Completed..")
- sleep(1)
- break
- elseif args[4] == 9 then
- -- Copy folder
- if datacopied then
- fs.copy(CLIPBOARD[1], fs.combine(pathdata, CLIPBOARD[2]))
- datacopied = false
- CLIPBOARD = nil
- draw.popup("Pasted..")
- sleep(1)
- break
- else
- CLIPBOARD = {filepath, filepath:sub(pathdata:len())}
- datacopied = true
- draw.popup("Copied..")
- sleep(1)
- break
- end
- elseif args[4] == 10 then
- -- Delete folder
- local shalldo = xplore.popup("Delete folder?")
- if shalldo then
- fs.delete(filepath)
- draw.popup("Completed..")
- sleep(1)
- end
- break
- end
- end
- end
- break
- end
- elseif filetype == "file" then
- draw.texta(" Options: ", 17, 6, false, "lime", "cyan")
- sleep(0.05)
- draw.texta(" -------- ", 17, 7, false, "lime", "cyan")
- sleep(0.05)
- draw.texta(" Rename ", 17, 8, false, "white", "cyan")
- sleep(0.05)
- if datacopied then
- draw.texta(" Paste ", 17, 9, false, "white", "cyan")
- else
- draw.texta(" Copy ", 17, 9, false, "white", "cyan")
- end
- sleep(0.05)
- draw.texta(" Delete ", 17, 10, false, "white", "cyan")
- sleep(0.05)
- draw.texta(" Edit ", 17, 11, false, "white", "cyan")
- while true do
- local args = { os.pullEvent("mouse_click") }
- if args[2] == 1 then
- if (args[3] >= 17 and args[3] <= 26) then
- if args[4] == 8 then
- -- Move file
- local newpath = xplore.input("New file name:")
- fs.move(filepath, newpath)
- draw.popup("Completed..")
- sleep(1)
- break
- elseif args[4] == 9 then
- -- Copy folder
- if datacopied then
- fs.copy(CLIPBOARD[1], fs.combine(pathdata, CLIPBOARD[2]))
- datacopied = false
- CLIPBOARD = nil
- draw.popup("Pasted..")
- sleep(1)
- break
- else
- CLIPBOARD = {filepath, filepath:sub(pathdata:len())}
- datacopied = true
- draw.popup("Copied..")
- sleep(1)
- break
- end
- elseif args[4] == 10 then
- -- Delete file
- local shalldo = xplore.popup("Delete file?")
- if shalldo then
- fs.delete(filepath)
- draw.popup("Completed..")
- sleep(1)
- end
- break
- elseif args[4] == 11 then
- -- Edit
- local shalldo = xplore.popup("Edit file?")
- if shalldo then
- shell.run("edit "..filepath)
- end
- break
- end
- end
- end
- break
- end
- elseif filetype == "nil" then
- draw.texta(" Options: ", 17, 6, false, "lime", "cyan")
- sleep(0.05)
- draw.texta(" -------- ", 17, 7, false, "lime", "cyan")
- sleep(0.05)
- if datacopied then
- draw.texta(" Paste ", 17, 8, false, "white", "cyan")
- end
- while true do
- local args = { os.pullEvent("mouse_click") }
- if args[2] == 1 then
- if (args[3] >= 17 and args[3] <= 26) then
- if args[4] == 8 then
- -- Copy folder
- if datacopied then
- fs.copy(CLIPBOARD[1], fs.combine(pathdata, CLIPBOARD[2]))
- datacopied = false
- CLIPBOARD = nil
- draw.popup("Pasted..")
- sleep(1)
- break
- end
- end
- end
- end
- break
- end
- end
- end
- function xplore.input(inputname)
- draw.box(5, 43, 8, 3, " ", "grey", "grey")
- draw.box(5, 43, 9, 1, " ", "grey", "grey")
- draw.textc(" "..inputname, 8, false, "white", "grey")
- draw.box(7, 39, 9, 1, " ", "cyan", "cyan")
- term.setCursorPos(7, 9)
- col.set("white", "cyan")
- write(": ")
- return tostring(read())
- end
- function xplore.error(errormessage)
- col.screen("white")
- draw.box(1, 51, 1, 1, false, "grey", "grey")
- draw.textc(" xPlore: An error occured", 1, false, "lightBlue", "grey")
- local sText = "xPlore has ran into an error that it could not fix, or find a work around. We will attempt to restart the script again, if this error persists you will be redirected to a terminal. Please use the settings to set a return program in case of crashes."
- for k,v in ipairs(data.wordwrap(sText, 51)) do
- draw.texta(v, 1, k+2, false, "lightGrey", "white")
- end
- draw.texta("FYI (Error Code):", 3, 10, false, "black", "white")
- for k,v in ipairs(data.wordwrap(errormessage, 51)) do
- draw.texta(v, 1, k+11, false, "red", "white")
- end
- for i = 1, 47 do
- draw.texta(" ", i+2, 15, false, "blue", "blue")
- sleep(0.25)
- end
- local ok, err = pcall(function()
- xplore.main()
- end)
- if not ok then
- col.screen("black")
- term.setCursorPos(1, 1)
- shell.run("shell")
- end
- end
- xplore.get()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement