This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Ilikemlp123's profile picture

Send Events to computers attached as peripherals

Started by Ilikemlp123, 26 April 2017 - 03:58 AM
Ilikemlp123 #1
Posted 26 April 2017 - 05:58 AM
It would be very great if you could send events to computers/turtles attached as peripherals.
Another addition to my idea is the ability to send programs the same way.

the functions would be like this:

//send event
C1 = peripheral.find("computer")
C1.sendEvent("remoteEvent","params")
//send program
C1.sendProgram("path","remotepath")

Bomb Bloke #2
Posted 26 April 2017 - 06:35 AM
This happens to be exactly how modems function.

http://www.computercraft.info/wiki/Modem_%28API%29
Anavrins #3
Posted 26 April 2017 - 04:59 PM
This happens to be exactly how modems function.

http://www.computerc...Modem_%28API%29
Not quite, the callRemote function allows you to remotely call a function as the computer peripheral, which only contains these http://www.computercraft.info/wiki/Computer_(API)
There's nothing to send events or shell commands to the remote computer, you would have to code something that runs in the background listening to such commands.
Edited on 26 April 2017 - 03:03 PM
apemanzilla #4
Posted 01 May 2017 - 02:11 PM
This happens to be exactly how modems function.

http://www.computerc...Modem_%28API%29
Not quite, the callRemote function allows you to remotely call a function as the computer peripheral, which only contains these http://www.computerc.../Computer_(API)
There's nothing to send events or shell commands to the remote computer, you would have to code something that runs in the background listening to such commands.

BB means that you can cause events on another computer via modem messages.