Advertisement
J_Triggs

WebSite Browser ComputerCraft

Apr 23rd, 2013
10
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. -- Configuration.
  2. local modemSide = "back" -- Which side is the modem on?
  3. -- End Configuration.
  4.  
  5. rednet.open(modemSide)
  6. print("Computer Address: ")
  7. local input = read()
  8. rednet.send(tonumber(input), os.getComputerID())
  9. print("Standing by to receive site...")
  10. while true do
  11.   local blah,data = rednet.receive()
  12.   if(string.find(data, input)) then
  13.     use = string.sub(data, (string.len(input) + 1))
  14.     print(use)
  15.     if(fs.exists("site")) then
  16.       fs.delete("site")
  17.     end
  18.     local file = fs.open("site", "w")
  19.     file.write(use)
  20.     file:close()
  21.     shell.run("site")
  22.     fs.delete("site")
  23.     break
  24.   end
  25. end
  26. fs.delete("site")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement