Advertisement
minimite

commandline

Sep 14th, 2014
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.70 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. term.setTextColor(colors.lightGray)
  4. print("CommandLine [Version "..version.."]")
  5. print("")
  6. term.setTextColor(colors.white)
  7. function eject()
  8. disk.eject("right")
  9. disk.eject("left")
  10. disk.eject("top")
  11. disk.eject("bottom")
  12. disk.eject("front")
  13. disk.eject("back")
  14. end
  15.  
  16.  
  17. while true do
  18. term.setTextColor(colors.lightGray)
  19. local id = os.getComputerLabel() or os.getComputerID()
  20. local idt = id .. "\\"
  21. local def = "Users\\" .. idt
  22. local dir = def .. shell.dir()
  23. eject()
  24. term.setTextColor(colors.lightGray)
  25. local dir = dir:gsub("/","\\")
  26. write("C:\\"..dir..">")
  27. term.setTextColor(colors.lightGray)
  28. local line = read( nil, tCommandHistory )
  29. shell.run(line)
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement