Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- print("Entrez l'id de l'ordinateur destinataire")
- id = tonumber(io.read())
- shell.run("clear")
- print("Voulez-vous envoyez un programme (p) ou un fichier (f) ou quitter le programme de l'ordinateur rcepteur (exit)?")
- print("Tapez /quit pour quitter ce programme")
- type = io.read()
- rednet.send(id, type)
- if type == "f" then
- print("Quel est le nom du fichier a envoyer?")
- fileOpen = io.read()
- local file = fs.open(fileOpen, "r")
- local sFile = file.readAll()
- rednet.send(id, sFile)
- file.close()
- print("Fichier envoy")
- elseif type == "p" then
- print("Quel est le nom du programme ?")
- programSend = io.read()
- rednet.send(id, programSend)
- print("Tapez l'argument du programme (0 si pas d'argument):")
- argument = io.read()
- rednet.send(id, argument)
- print("Programme envoy")
- elseif type == "exit" then
- print("Programme quitt")
- rednet.send(id, type)
- elseif type == "/quit" then
- shell.run("clear")
- rednet.close("right")
- return
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement