Advertisement
thegreatstudio

dummies

May 3rd, 2013
428
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. function box()
  2. term.clear()
  3. term.setCursorPos(17, 1)
  4. print("Craft Desktop Alpha")
  5. term.setCursorPos(10, 2)
  6. print("Created by: thegreatstudio")
  7. term.setCursorPos(1, 3)
  8. print("[File Browser]")
  9. term.setCursorPos(1, 4)
  10. print("[Edit]")
  11. term.setCursorPos(1, 5)
  12. print("[Paint]")
  13. term.setCursorPos(1, 6)
  14. print("[Pastebin]")
  15. term.setCursorPos(1, 7)
  16. print("[Exit]")
  17. end
  18.  
  19. box()
  20. while true do
  21. local event, button, X, Y = os.pullEvent("mouse_click")
  22. if event == "mouse_click" then
  23. if X >= 1 and X <= 20 and Y == 3 and button == 1 then
  24. shell.run("gfb")
  25. elseif X >= 1 and X <= 19 and Y == 4 and button == 1 then
  26. shell.run("edit")
  27. write("Please write the title of your file: ")
  28. local name2 = read()
  29. shell.run("edit", name2)
  30. elseif X >= 1 and X <= 18 and Y == 5 and button == 1 then
  31. write("Please write the title of your file: ")
  32. local name = read()
  33. shell.run("paint", name)
  34. elseif X >= 1 and X <= 17 and Y == 6 and button == 1 then
  35. write("Please write the pastebin code: ")
  36. local code = read()
  37. write("Please write the filename: ")
  38. local filename = read()
  39. shell.run("pastebin", "get", code, filename)
  40. elseif X >= 1 and X <= 16 and Y == 7 and button == 1 then
  41. break
  42. end
  43. end
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement