Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Billboard sharing...") -- Displays the name at the start
- tostring(read()) -- This makes the output the user writes be a string
- filePath = "billboard.txt" -- This assigns whatever the user writes to become the variable: filePath.
- computerNumber = 1
- print("Preparing text file...") -- Tells the user the data is being processed and it is making the file sendable.
- local fileToSend = fs.open(filePath, "r")
- fileContents = fileToSend.readAll()
- strFile = textutils.serialize(fileContents)
- term.clear() -- clears screen
- term.setCursorPos(1,1) -- sets cursor position to top left of screen
- print("Please run the receive program on the receiving computer, then press 's' to send")
- local event, param1 = os.pullEvent("char") -- this waits for a key to be pressed
- if param1 == "s" then -- if you press the s key then
- print("Sending...") -- prints sending
- rednet.send(computerID, strFile) -- Sends file
- sleep(0.5) -- waits half a second
- p1rint("Sent!") -- tells user it has sent
- else -- if it is another key then
- print("wrong key") -- prints wrong key
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement