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

Question? auto start

Started by DireEpidemic, 24 July 2012 - 02:21 PM
DireEpidemic #1
Posted 24 July 2012 - 04:21 PM
Is there anyway to auto start a program without naming it startup?
tfoote #2
Posted 24 July 2012 - 04:47 PM
Yes. create this… (the program is to be named startup)

shell.run("your program") -- replace your program
DireEpidemic #3
Posted 24 July 2012 - 04:51 PM
Thank you :)/>/>
DireEpidemic #4
Posted 25 July 2012 - 11:49 AM
Is there a way to put this into the code i need to auto start if i have more than one program, or will i just have to list the code over and over again calling the different programs files in the startup?
Xfel #5
Posted 25 July 2012 - 05:35 PM
you could make a folder named "autostart" or similar, and make your startup program run every file inside
tfoote #6
Posted 25 July 2012 - 05:45 PM
Also you can do this…

function program1()
--Put all the code of program 1 into here
-- I havent experimented with using the shell.run() in here but you could try
end
function program2()
--same as above. but program 2
end
parallell.waitForAny(program1(), program2()) -- you can also use parallell.waitForAll(same)

Hope this helped
iLikePHP #7
Posted 24 February 2014 - 05:36 AM
Yes. create this… (the program is to be named startup)

shell.run("your program") -- replace your program

Thanks, that worked excellently for me!