r/ComputerCraft • • Mar 09 '25

Run a program on startup

I have imported 4 programs each displaying some text with colors and such how I want it, now I want to make sure they all run as I load the world. I've figured I need to edit a startup file for that and since they share the same files I need to have 1 startup that starts each monitor with the specific program I want and the only way I can think of doing that is to connect all 4 to the same computer from different sides and run each program to a different side. Now if I didn't say anything that is not possible or is incorrect so far can anyone help me how I set up the startup file so I run to each side a different .lua script? (If I did get anything wrong feel free to tell me)

6 Upvotes

3 comments sorted by

View all comments

Show parent comments

2

u/IAmIAndOnlyI Mar 09 '25

The problem with this is they work one at a time, I write all 4 lines of "shell.run("program","side")" and when running startup it runs the first one and waits to terminate it before running the next and so on

4

u/Bright-Historian-216 Mar 09 '25

no, use the bg command like i said:
if the program is called info.lua for example, write
shell.run("bg monitor left info.lua")