Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- file = "blank"
- check = "blank"
- ifystem = "blank"
- ifsystem2 = "blank"
- checkiffile = "blank"
- if openf == nil then
- openf = "isnil"
- end
- while true do
- if openf == nil then
- else
- --checkiffile = openf .. "FILEEXECUTE"
- checkiffile = openf
- systemfiles = "checkfirst*displaybg.nfp*dlwin.nfp*internetbg.nfp*urllist*webdl*temp128*setuppass*openfile.nfp*flag.nfp*black.nfp*boot*hills.nfp*desktop*beginmenu.nfp*begin*icon3.nfp*icon2.nfp*icon1.nfp*login*setupbg.nfp*installprgbg.nfp*update*pb*run*profilelabel*profilepass*profileinbg.nfp*profileset*profilesetbg.nfp*error*error.nfp*display*white*openfilebg.nfp*display.nfp*404*browse*webbg.nfp*audio*calc*startup*text*textsplash.nfp*folders*p*shutdown.nfp*folderbg.nfp*savedata*password*username*BGbackup*backgrounds*icons*icon1.nfp*icon2.nfp*icon3.nfp*setupfinal*internet*00111001*blank*url*keep*Windrows*webbg.nfp"
- --if fs.exists(checkiffile) then
- ifsystem, ifsystem2 = string.find(systemfiles, checkiffile)
- if checkiffile == "Documents" then
- ifsystem = 0
- elseif checkiffile == "Images" then
- ifsystem = 0
- elseif checkiffile == "Programs" then
- ifsystem = 0
- elseif checkiffile == "Windrows" then
- ifsystem = 0
- elseif ifsystem == 1 then
- ifsystem = 0
- end
- if ifsystem == nil then
- ifsystem = 0
- end
- --[Open folder or file] If not a system file, open it.
- if ifsystem == 0 then
- openf = ""
- if fs.isDir(checkiffile) then
- openf = checkiffile
- else
- shell.run(checkiffile)
- end
- else
- write(ifsystem)
- print(" is not 0")
- sleep(1)
- folder = "C:/"
- openf = ""
- end
- end
- paintutils.drawLine(1, 19, 5, 19, colors.gray)
- paintutils.drawLine(6, 19, 60, 19, colors.lightGray)
- term.setCursorPos(1, 19)
- term.setBackgroundColor(colors.gray)
- term.setTextColor(colors.white)
- write "Begin"
- last = "folders"
- local function read()
- local input = ''
- local x,y = term.getCursorPos()
- term.setCursorBlink(true)
- repeat
- term.setCursorPos(x,y)
- term.write(input)
- local ev, p1 = os.pullEvent()
- if ev == 'char' then
- term.setCursorPos(1, 1)
- print (key)
- term.setCursorPos(x,y)
- if #input < 49 then
- if #input > -1 then
- input = input .. p1
- end
- end
- elseif ev == 'key' then
- if p1 == keys.backspace then
- if #input > 0 then
- d, yn = term.getCursorPos()
- dt = d - 1
- term.setCursorPos(dt, 3)
- write " "
- term.setCursorPos(d, 3)
- input = input:sub(1, #input - 1)
- end
- end
- end
- until ev == 'key' and p1 == keys.enter
- term.setCursorBlink(false)
- return input
- end
- function listfs()
- num = 0
- one = nil
- listnum = 0
- if openf == nil then
- openf = "c"
- end
- if openf == "c" then
- openf = ""
- end
- ypos = 4
- if select == nil then
- select = "Choose a folder."
- end
- one = bu
- two = nil
- three = nil
- four = nil
- five = nil
- six = nil
- seven = nil
- eight = nil
- on = nil
- listnum = 0
- local FileList = fs.list(openf)
- local counter = 0
- local color = {colors.black,colors.black}
- for _, check in ipairs(FileList) do
- if check == nil then
- check = "isnil"
- end
- f = 1
- if check == "password" then
- f = 0
- elseif check == "username" then
- f = 0
- elseif check == "rom" then
- f = 0
- elseif check == "settings" then
- f = 0
- elseif check == "backgrounds" then
- f = 0
- elseif check == "BGBACKUP" then
- f = 0
- elseif check == "previewBG" then
- f = 0
- elseif check == "savedata" then
- f = 0
- elseif check == "icons" then
- f = 0
- end
- if openf == "" then
- file = check
- fname = check
- else
- file = openf .. "/" .. check
- fname = check
- end
- --d
- ifsystem, ifsystem2 = string.find(systemfiles, file)
- if ifsystem == nil then
- ifsystem = 0
- end
- if string.find(file, "checkfirst") then
- f = 0
- end
- if string.find(file, "keep") then
- f = 0
- end
- if ifsystem < 1 then
- if f == 1 then
- ypos = ypos + 1
- term.setTextColor(color[(counter % 2) +1])
- listnum = listnum + 1
- --d
- ifsystem, ifsystem2 = string.find(systemfiles, file)
- if ifsystem == nil then
- ifsystem = 0
- end
- if string.find(file, "checkfirst") then
- f = 0
- end
- if string.find(file, "keep") then
- f = 0
- end
- if ifsystem < 1 then
- if listnum == 1 then
- one = file
- on = one
- elseif listnum == 2 then
- two = file
- on = two
- elseif listnum == 3 then
- three = file
- on = three
- elseif listnum == 4 then
- four = file
- on = four
- elseif listnum == 5 then
- five = file
- on = five
- elseif listnum == 6 then
- six = file
- on = six
- elseif listnum == 7 then
- seven = file
- on = seven
- end
- if listnum == 8 then
- eight = file
- on = eight
- end
- if listnum == 9 then
- nine = file
- on = nine
- end
- if listnum == 10 then
- ten = file
- on = ten
- end
- if listnum == 11 then
- eleven = file
- on = eleven
- end
- if listnum == 12 then
- twelve = file
- on = twelve
- end
- if listnum == 13 then
- thirteen = file
- on = thirteen
- end
- end
- term.setCursorPos(14, ypos)
- if select == on then
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- paintutils.drawLine(14, ypos, 39, ypos, colors.black)
- term.setCursorPos(14, ypos)
- --selex = select .. "FILEEXECUTE"
- selex = select
- --if fs.exists(selex) then
- if not(fs.isDir(selex)) then
- else
- write "(Folder) "
- end
- write (select)
- --if ran == nil then
- --ofbu = openf
- --shell.run("cppa")
- --end
- if ran == 1 then
- ran = nil
- end
- select = nil
- else
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- end
- if num < 13 then
- --PART2
- --checkiffile = file .. "FILEEXECUTE"
- --if fs.exists(checkiffile) then
- checkiffile = file
- if not(fs.isDir(checkiffile)) then
- term.setTextColor(colors.black)
- else
- term.setTextColor(colors.black)
- write "(Folder) "
- end
- print(fname)
- end
- num = num + 1
- counter = counter+1
- end
- else
- if folder == "C:/" then
- else
- if f == 1 then
- ypos = ypos + 1
- term.setTextColor(color[(counter % 2) +1])
- listnum = listnum + 1
- --d
- ifsystem, ifsystem2 = string.find(systemfiles, file)
- if ifsystem == nil then
- ifsystem = 0
- end
- if string.find(file, "checkfirst") then
- f = 0
- end
- if string.find(file, "keep") then
- f = 0
- end
- if ifsystem < 1 then
- if listnum == 1 then
- one = file
- on = one
- elseif listnum == 2 then
- two = file
- on = two
- elseif listnum == 3 then
- three = file
- on = three
- elseif listnum == 4 then
- four = file
- on = four
- elseif listnum == 5 then
- five = file
- on = five
- elseif listnum == 6 then
- six = file
- on = six
- elseif listnum == 7 then
- seven = file
- on = seven
- end
- if listnum == 8 then
- eight = file
- on = eight
- end
- if listnum == 9 then
- nine = file
- on = nine
- end
- if listnum == 10 then
- ten = file
- on = ten
- end
- if listnum == 11 then
- eleven = file
- on = eleven
- end
- if listnum == 12 then
- twelve = file
- on = twelve
- end
- if listnum == 13 then
- thirteen = file
- on = thirteen
- end
- end
- term.setCursorPos(14, ypos)
- if select == on then
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- paintutils.drawLine(14, ypos, 39, ypos, colors.black)
- term.setCursorPos(14, ypos)
- else
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- end
- if num < 13 then
- print(file)
- end
- num = num + 1
- counter = counter+1
- end
- end
- end
- end
- end
- local win = paintutils.loadImage("folderbg.nfp")
- paintutils.drawImage(win, 1, 1)
- term.setCursorPos(1, 1)
- term.setTextColor(colors.white)
- term.setBackgroundColor(colors.cyan)
- if openf == nil then
- folder = "C:/"
- end
- if openf == "c" then
- folder = "C:/"
- end
- write "Windrows Explorer"
- term.setCursorPos(51, 1)
- term.setBackgroundColor(colors.red)
- write "X"
- term.setCursorPos(2, 3)
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- if openf == nil then
- term.setCursorPos(2, 3)
- write "C:/"
- elseif openf == "c" then
- term.setCursorPos(2, 3)
- write "C:/"
- else
- if folder == nil then
- folder = "C:/" .. openf
- end
- write (folder)
- print (openf)
- end
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.cyan)
- term.setCursorPos(2, 6)
- write "Tasks"
- term.setCursorPos(2, 10)
- write "Places"
- term.setCursorPos(2, 7)
- term.setTextColor(colors.cyan)
- term.setBackgroundColor(colors.lightBlue)
- print "Make Folder"
- term.setCursorPos(2, 8)
- print "Delete"
- term.setCursorPos(2, 11)
- print "Images"
- term.setCursorPos(2, 12)
- print "Disk"
- term.setCursorPos(2, 13)
- print "Programs"
- term.setCursorPos(2, 14)
- print "Windrows"
- term.setCursorPos(2, 15)
- print "C:/"
- term.setCursorPos(15, 5)
- term.setTextColor(colors.black)
- term.setBackgroundColor(colors.white)
- listfs()
- local event, button, x, y = os.pullEvent("mouse_click")
- if y == 1 then
- if x == 51 then
- last = "desktop"
- openf = ""
- shell.run("desktop")
- end
- end
- if y == 7 then
- if x > 1 then
- if x < 13 then
- paintutils.drawLine(2, 7, 12, 7, colors.black)
- term.setTextColor(colors.white)
- term.setBackgroundColor(colors.black)
- term.setCursorPos(2, 7)
- write "Make Folder"
- sleep(0.1)
- paintutils.drawLine(2, 7, 12, 7, colors.lightBlue)
- term.setTextColor(colors.cyan)
- term.setBackgroundColor(colors.lightBlue)
- term.setCursorPos(2, 7)
- write "Make Folder"
- paintutils.drawLine(2, 3, 50, 3, colors.white)
- term.setCursorPos(2, 3)
- term.setTextColor(colors.black)
- newfname = read()
- exists = fs.exists(newfname)
- if exists == false then
- if openf == nil then
- fs.makeDir(newfname)
- copy = "copy keep " .. newfname
- shell.run(copy)
- else
- make = openf .. "/" .. newfname
- fs.makeDir(make)
- copy = "copy keep " .. make
- shell.run(copy)
- end
- else
- errortitle = "Cannot make folder"
- error = " Folder already"
- error2 = " exists."
- errora = "fs.exists returned true"
- newfname = nil
- exists = nil
- shell.run("error")
- end
- end
- end
- end
- if y == 8 then
- if x > 1 then
- if x < 13 then
- paintutils.drawLine(2, 8, 12, 8, colors.black)
- term.setTextColor(colors.white)
- term.setBackgroundColor(colors.black)
- term.setCursorPos(2, 8)
- write "Delete"
- sleep(0.1)
- paintutils.drawLine(2, 8, 12, 8, colors.lightBlue)
- term.setTextColor(colors.cyan)
- term.setBackgroundColor(colors.lightBlue)
- term.setCursorPos(2, 8)
- write "Delete"
- paintutils.drawLine(2, 3, 50, 3, colors.white)
- term.setCursorPos(2, 3)
- term.setTextColor(colors.black)
- delfname = read()
- delfname = openf .. "/" .. delfname
- --delexcheck = delfname .. "FILEEXECUTE"
- delexcheck = delfname
- if fs.exists(delfname) then
- fs.delete(delfname)
- if fs.exists(delexcheck) then
- fs.delete(delexcheck)
- end
- else
- delete = openf .. "/" .. delfname
- if fs.exists(delete) then
- fs.delete(delete)
- else
- errortitle = "Cannot delete"
- error = " File doesn't"
- error2 = " exist."
- errora = "fs.exists returned false"
- shell.run("error")
- end
- end
- end
- end
- end
- if x < 6 then
- if y == 19 then
- term.setCursorPos(1, 19)
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- write "Begin"
- sleep(0.1)
- shell.run("begin")
- end
- end
- if x > 13 then
- if y > 4 then
- if y == 5 then
- if button == 1 then
- openf = one
- bu = openf
- else
- select = one
- end
- elseif y == 6 then
- if button == 1 then
- openf = two
- bu = openf
- else
- select = two
- end
- elseif y == 7 then
- if button == 1 then
- openf = three
- bu = openf
- else
- select = three
- end
- elseif y == 8 then
- if button == 1 then
- openf = four
- bu = openf
- else
- select = four
- end
- elseif y == 9 then
- if button == 1 then
- openf = five
- bu = openf
- else
- select = five
- end
- elseif y == 10 then
- if button == 1 then
- openf = six
- bu = openf
- else
- select = six
- end
- elseif y == 11 then
- if button == 1 then
- openf = seven
- bu = openf
- else
- select = seven
- end
- elseif y == 12 then
- if button == 1 then
- openf = eight
- bu = openf
- else
- select = eight
- end
- elseif y == 13 then
- if button == 1 then
- openf = nine
- bu = openf
- else
- select = nine
- end
- elseif y == 14 then
- if button == 1 then
- openf = ten
- bu = openf
- else
- select = ten
- end
- elseif y == 15 then
- if button == 1 then
- openf = eleven
- bu = openf
- else
- select = eleven
- end
- elseif y == 16 then
- if button == 1 then
- openf = twelve
- bu = openf
- else
- select = twelve
- end
- elseif y == 17 then
- if button == 1 then
- openf = thirteen
- bu = openf
- else
- select = thirteen
- end
- end
- end
- end
- if y == 11 then
- if x > 1 then
- if x < 13 then
- paintutils.drawLine(2, 11, 12, 11, colors.black)
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- term.setCursorPos(2, 11)
- write "Images"
- sleep(0.1)
- if fs.exists("Documents/Images") then
- openf = "Documents/Images"
- else
- errortitle = "Cannot open"
- error = " You deleted the"
- error2 = " folder."
- errora = "fs.exists returned false."
- newfname = nil
- exists = nil
- shell.run("error")
- end
- end
- end
- end
- if y == 12 then
- if x > 1 then
- if x < 13 then
- paintutils.drawLine(2, 12, 12, 12, colors.black)
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- term.setCursorPos(2, 12)
- write "Disk"
- sleep(0.1)
- if fs.exists("disk") then
- openf = "disk"
- else
- errortitle = "Cannot open"
- error = " There is no"
- error2 = " disk."
- errora = "fs.exists returned false."
- newfname = nil
- exists = nil
- shell.run("error")
- end
- end
- end
- end
- if y == 13 then
- if x > 1 then
- if x < 13 then
- paintutils.drawLine(2, 13, 12, 13, colors.black)
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- term.setCursorPos(2, 13)
- write "Programs"
- sleep(0.1)
- if fs.exists("Programs") then
- openf = "Programs"
- else
- errortitle = "Cannot open"
- error = " You deleted the"
- error2 = " folder."
- errora = "fs.exists returned false."
- newfname = nil
- exists = nil
- shell.run("error")
- end
- end
- end
- end
- if y == 14 then
- if x > 1 then
- if x < 13 then
- paintutils.drawLine(2, 14, 12, 14, colors.black)
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- term.setCursorPos(2, 14)
- write "Windrows"
- sleep(0.1)
- if fs.exists("Windrows") then
- openf = "Windrows"
- else
- errortitle = "Cannot open"
- error = " You deleted the"
- error2 = " folder."
- errora = "fs.exists returned false."
- newfname = nil
- exists = nil
- shell.run("error")
- end
- end
- end
- end
- if y == 15 then
- if x > 1 then
- if x < 13 then
- paintutils.drawLine(2, 15, 12, 15, colors.black)
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- term.setCursorPos(2, 15)
- write "C:/"
- sleep(0.1)
- openf = ""
- end
- end
- end
- xbu = x
- ybu = y
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement