m31317015

myOS incomplete

Nov 22nd, 2014
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.91 KB | None | 0 0
  1. --Terms
  2. --1. Get Screen Size
  3. x, y = term.getSize()
  4.  
  5. --2. printOS() X Pos
  6. p = 1
  7.  
  8. --Functions
  9. --1. Main Install Code
  10. function install()
  11.   term.setBackgroundColor(colors.white)
  12.   term.clear()
  13.   term.setCursorPos(1,1)
  14.   printOS()
  15.   print("Initiating...")
  16.   sleep(1)
  17.   printOS()
  18.   print("Loading System Files...")
  19.   sleep(1)
  20.   printOS()
  21.   print("Loading Disk <//disk/myOS/> ...")
  22.   sleep(1)
  23.   printOS()
  24.   if fs.exists("myOS/mySystem/myOS.app") == false then
  25.     os.run("pastebin", "get", "code here", "myOS/mySystem/myOS.app")
  26.   else
  27.     print("System Application has been detected")
  28.   end
  29.   os.run({}, "myOS/mySystem/myOS.app")
  30. end
  31.  
  32. --2."<myOS>" printing
  33. function printOS()
  34.   term.setCursorPos(1,p)
  35.   term.setTextColor(colors.red)
  36.   print("myOS>")
  37.   term.setTextColor(colors.black)
  38.   term.setCursorPos(6,p)
  39.   p = p + 1
  40. end
  41.  
  42. --Loading Programs
  43. --1. Login User Interface
  44. install()
  45.  
  46. --2.Pastebin
Advertisement
Add Comment
Please, Sign In to add comment