Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Prompt the user to enter the ID of the target computer
- print("Enter the ID of the target computer:")
- local targetID = tonumber(read())
- -- Initialize modem
- rednet.open("top")
- -- Request the target computer to broadcast its screen
- rednet.broadcast("screen_request", targetID)
- -- Listen for the response from the target computer
- while true do
- local senderID, message = rednet.receive()
- if senderID == targetID and message then
- -- Print the received screen data to the current computer's monitor
- term.clear()
- term.setCursorPos(1, 1)
- print(message)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement