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

Autostart program on monitors!

Started by McDiscoStick, 24 December 2012 - 05:47 PM
McDiscoStick #1
Posted 24 December 2012 - 06:47 PM
So I'm a complete noob to coding, but I can catch on pretty quick. Here's my problem.. I'm helping start a server and my spawn area has a bunch of computers with monitors and I'm having difficulty keeping them on whenever a chunk unloads or the server restarts.

Can anyone help me with autostarting a simple text program? I'm running 1.31.
PixelToast #2
Posted 24 December 2012 - 07:34 PM
run this in the shell:

edit startup
then put in code like this and save it:

shell.run("textprogram")
change textprogram to whatever you want
McDiscoStick #3
Posted 25 December 2012 - 06:14 PM
erm, so I did what you said and everytime I restart the server nothing displays on the monitor until I manually reboot the computer. The computer is on when I load the server, I open the interface and it says "CraftOS 1.3" then I exit out, look at the monitor.. nothing. Then I go back to the computer and type "reboot" and look at the monitor, then the textprogram displays. I'm trying to avoid doing anything manual, I'd like the program to display as the server starts.. Is this possible?
McDiscoStick #4
Posted 26 December 2012 - 05:10 AM
Annyone?
remiX #5
Posted 26 December 2012 - 05:21 AM
Firstly, this should be in Ask a pro.

And the reason you have to open it after every restart because the chunk is unloaded. I think people say using a World Anchor works.
CodeMachine #6
Posted 26 December 2012 - 09:44 AM
If you are trying to run the program on a monitor then:

 
shell.run("monitor", "sideofmonitor", "textprogram")

Change sideofmonitor to the side the monitor is attached to and textprogram, again,


to the name of your program
Grim Reaper #7
Posted 26 December 2012 - 10:20 AM
Firstly, this should be in Ask a pro.

And the reason you have to open it after every restart because the chunk is unloaded. I think people say using a World Anchor works.
If you are trying to run the program on a monitor then:


shell.run("monitor", "sideofmonitor", "textprogram")

Change sideofmonitor to the side the monitor is attached to and textprogram, again,


to the name of your program

Both of you are offering good advice, however CodeMachine's response won't probably fix the problem MrDiscoStick has described. Remix makes a better point, and thus you should talk to your server administrator about installing World Anchor as a plugin so the chunks your computers are in won't unload and cause you to have to manually restart them.
McDiscoStick #8
Posted 26 December 2012 - 12:10 PM
i am actually the administrator, i can use world anchors. Unfortunately when i restart the server i still have to go in and reboot the computers. so essentially, i was trying to do this without actually using an anchor.
remiX #9
Posted 26 December 2012 - 12:21 PM
Just put the anchor underground :D/>
Grim Reaper #10
Posted 26 December 2012 - 12:51 PM
i am actually the administrator, i can use world anchors. Unfortunately when i restart the server i still have to go in and reboot the computers. so essentially, i was trying to do this without actually using an anchor.

That is strange. If you have the world anchor setup properly and the program you wish to run set as '/startup' on your computers then it should run when you reboot the server. It could be a bug with the mod seeing as you're using an earlier version.
PixelToast #11
Posted 26 December 2012 - 03:55 PM
my suggestion sould have worked also because it will be loaded whenever someone walks near it

its because in 1.31 it dosent have that feature
you sould seriously update because its so outdated
McDiscoStick #12
Posted 26 December 2012 - 06:18 PM
yea i'm running a public tekkit server on the latest recommended build, so that should be fun.
PixelToast #13
Posted 26 December 2012 - 06:26 PM
lol tekkit
you probably wont get any players anytime soon
McDiscoStick #14
Posted 26 December 2012 - 07:12 PM
lol i'll just let you think that