MudkipTheEpic

VerticalWrite: WIP

Dec 17th, 2012
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. detect = shell.getRunningProgram()
  2. if detect == ("disk/verticalwrite") and fs.exists("verticalwrite") ~= true then
  3. shell.run("rom/programs/copy disk/verticalwrite verticalwrite")
  4. else
  5. end
  6.  
  7.  
  8. term.clear()
  9. term.setCursorPos(1,1)
  10. print("-----Welcome to Vertical Write! Click to exit!-----")
  11. term.setCursorPos(2,1)
  12. while true do
  13. event, param1, param2 = os.pullEvent()
  14. if event == "mouse_click" then
  15. term.clear()
  16. term.setCursorPos(20,10)
  17. textutils.slowPrint("Exiting.....")
  18. sleep(1)
  19. term.clear()
  20. term.setCursorPos(1,1)
  21. break
  22. elseif event == "char" and param1 ~= "14" or "221" then
  23. print("-------------------------"..param1.."-------------------------")
  24. currX, currY = term.getCursorPos()
  25. term.setCursorPos(1,1)
  26. write("-----Welcome to Vertical Write! Click to exit!-----")
  27. term.setCursorPos(currX, currY)
  28. elseif event == "char" and param1 == "14" or "211" then
  29. currX, currY = term.getCursorPos()
  30. currY = currY - 1
  31. term.setCursorPos(currX, currY)
  32. term.clearLine()
  33. else
  34. end
  35. end
Advertisement
Add Comment
Please, Sign In to add comment