Advertisement
tima_gt

tde-terminal

Sep 15th, 2013
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. local function restoretext()
  2. term.setTextColor(colors.black)
  3. term.setBackgroundColor(colors.white)
  4. term.clear()
  5. end
  6. term.setBackgroundColor(colors.white)
  7. term.clear()
  8. term.setCursorPos(1,1)
  9. term.setTextColor(colors.white)
  10. term.setBackgroundColor(colors.black)
  11. write(" Terminal ")
  12. term.setTextColor(colors.black)
  13. term.setBackgroundColor(colors.white)
  14. term.setCursorPos(1,2)
  15. write("For exit write exit")
  16. trues = true
  17. local xter yter = term.getCursorPos()
  18. term.setCursorPos(1,3)
  19. while trues == true do
  20. if xter == 1 and yter == 1 then
  21. term.setCursorPos(1, 2)
  22. end
  23. write(">")
  24. command = read()
  25. if command == "exit" then
  26. print("Exitting...")
  27. trues = false
  28. elseif command == "ls" then
  29. term.setBackgroundColor(colors.black)
  30. shell.run(command)
  31. term.setBackgroundColor(colors.white)
  32. term.setTextColor(colors.black)
  33. elseif command == "edit" then
  34. shell.run("pastebin run vyAZc6tJ")
  35. else
  36. shell.run(command)
  37. sleep(1)
  38. restoretext()
  39. shell.run("pastebin run AK50tpr8")
  40. end
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement