Posted 20 September 2013 - 09:38 PM
Title: How to send commands wirelessly, and some monitor help?
I'm new to computercraft, only able to do what's probably the most basic of stuff on my own such as running a program on a monitor, sending a message over rednet, and password locking a computer, so please go slowly for my sake.
I'm wondering how to do a few things:
1. How to have a program write to both a computer screen, and a monitor
For example, I can do "monitor left adventure", and run the Adventure program on my monitor, but each time I type in a command, I have to close out the computer UI and then go look at the monitor because nothing will show up on the computer. I'd like it to write to both, so I can just keep going on the computer, but also be able to look at the monitor to see everything, not just one or the other.
2. How to send commands over rednet
I have a simple startup program that automatically opens rednet, and then I can do "rednet.receive()" to hold it open for a message, and "rednet.broadcast("Message")" on another computer to send some text over to the other, but that's it. How would I make it so I can run programs on one computer from another, and not just send/receive text?
3. How to do confirmation messages depending on the current state of something.
Ultimately what I'm trying to do is use my one main computer to control a lot of my base's functions by sending commands to other computers and having them do things. running a program like "Engines" send a message to another computer to toggle my engines on/off if they're overheating or something, or telling another computer to start running adventure, so it's running and waiting for me, and I can look at the monitor and see my progress at a glance before going into the computer to actually play it.
But for example, with the engines, I'd like it to say something like "Engines are now off" or "Engines are now on" so I'm not just blindly toggling, and I'm not sure how I can do that.
All of this seems like it would be relatively simple to do, but then again I know next to nothing.
I'm new to computercraft, only able to do what's probably the most basic of stuff on my own such as running a program on a monitor, sending a message over rednet, and password locking a computer, so please go slowly for my sake.
I'm wondering how to do a few things:
1. How to have a program write to both a computer screen, and a monitor
For example, I can do "monitor left adventure", and run the Adventure program on my monitor, but each time I type in a command, I have to close out the computer UI and then go look at the monitor because nothing will show up on the computer. I'd like it to write to both, so I can just keep going on the computer, but also be able to look at the monitor to see everything, not just one or the other.
2. How to send commands over rednet
I have a simple startup program that automatically opens rednet, and then I can do "rednet.receive()" to hold it open for a message, and "rednet.broadcast("Message")" on another computer to send some text over to the other, but that's it. How would I make it so I can run programs on one computer from another, and not just send/receive text?
3. How to do confirmation messages depending on the current state of something.
Ultimately what I'm trying to do is use my one main computer to control a lot of my base's functions by sending commands to other computers and having them do things. running a program like "Engines" send a message to another computer to toggle my engines on/off if they're overheating or something, or telling another computer to start running adventure, so it's running and waiting for me, and I can look at the monitor and see my progress at a glance before going into the computer to actually play it.
But for example, with the engines, I'd like it to say something like "Engines are now off" or "Engines are now on" so I'm not just blindly toggling, and I'm not sure how I can do that.
All of this seems like it would be relatively simple to do, but then again I know next to nothing.