Advertisement
Jeyjey0

Webeditor for CC

Sep 7th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. term.clear()
  2. print("Pls enter your name of the Website!")
  3. name = read()
  4. local fileHandle = fs.open (name, 'w')
  5. fileHandle.write(textutils.unserialize (" ","w"))
  6. fileHandle.close()
  7. shell.run("edit ",name)
  8. function pub()
  9. term.clear()
  10. term.setCursorPos(1, 1)
  11. print("publishing website")
  12. shell.run("pastebin put ",name)
  13. print("Pls enter the Pastebin CODE!")
  14. pastebincode = read()
  15. print("You have entered ",pastebincode)
  16. print("Enter yes or no")
  17. aus = read()
  18. if aus == "yes" then
  19. print("OK")
  20. local fileHandle = fs.open (name, 'w')
  21. local fileHandle = fs.open (name, 'a')
  22. fileHandle.writeLine("local filePath = 'ids' ")
  23. fileHandle.writeLine("local fileHandle = fs.open (filePath, 'r')")
  24. fileHandle.writeLine("id = textutils.unserialize (fileHandle.readAll())")
  25. fileHandle.writeLine("fileHandle.close()")
  26. fileHandle.writeLine("local filePath = 'messages'")
  27. fileHandle.writeLine("local fileHandle = fs.open (filePath, 'r')")
  28. fileHandle.writeLine("website = textutils.unserialize (fileHandle.readAll())")
  29. fileHandle.writeLine("code = "..'"'.."pastebin get "..pastebincode..' '..name..'"')
  30. fileHandle.writeLine("rednet.send(id,code)")
  31. end
  32. if aus == "no" then
  33. pub()
  34. end
  35. end
  36. pub()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement