Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Initialize modem
- rednet.open("top")
- while true do
- local senderID, message = rednet.receive()
- if message == "screen_request" then
- -- Clear the term buffer
- term.clear()
- term.setCursorPos(1, 1)
- -- Capture the screen data
- local screenData = ""
- for y = 1, 19 do -- Assuming a standard ComputerCraft monitor with 19 lines
- screenData = screenData .. term.getLine(y) .. "\n"
- end
- -- Send the screen data back to the host computer
- rednet.send(senderID, screenData)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement