20 posts
Posted 10 August 2014 - 03:23 PM
Hi,
I have a question.
How would you run a program using shell.run or os.run without stopping the program that is running that program?
Thanks
-MadBudder
1140 posts
Location
Kaunas, Lithuania
Posted 10 August 2014 - 08:04 PM
If you are running on CC 1.6+ then you can use the new
multishell multitasking system:
multishell.launch({shell=shell,multishell=multishell}, "rom/programs/fun/worm") --// Launch the "Worm" game passing multishell and shell APIs to it
But if you are running an earlier version of ComputerCraft then it is a little harder, but still achievable using the
parallel API.
EDIT: there might be an easier solution for your problem, if could just tell us what you are trying to achieve.
Edited on 10 August 2014 - 06:06 PM
20 posts
Posted 10 August 2014 - 09:40 PM
If you are running on CC 1.6+ then you can use the new
multishell multitasking system:
multishell.launch({shell=shell,multishell=multishell}, "rom/programs/fun/worm") --// Launch the "Worm" game passing multishell and shell APIs to it
But if you are running an earlier version of ComputerCraft then it is a little harder, but still achievable using the
parallel API.
EDIT: there might be an easier solution for your problem, if could just tell us what you are trying to achieve.
Thanks.
How would I use the Parallel API Exactly to do this?
Something like parallel.waitForAny/All(shell.run(whateverProgam))?
1140 posts
Location
Kaunas, Lithuania
Posted 10 August 2014 - 10:18 PM
Depends on what you are trying to do. Could you give us a little more information?
Edit: also, what version of CC are you using?
Edited on 10 August 2014 - 08:22 PM
20 posts
Posted 10 August 2014 - 10:31 PM
Im using 1.6, Though I might think using parallel Might be mroe efficient on what Im doing.
Im just trying to create a program alike what OneOS can do, switch back between programs And the Desktop.
1140 posts
Location
Kaunas, Lithuania
Posted 10 August 2014 - 10:41 PM
Ah, so a Desktop system? Well, for that I would suggest to make your own coroutine management system. Go ahead to the Tutorials subforum, Bubba has written a nice tutorial on coroutines there.
20 posts
Posted 10 August 2014 - 11:37 PM
Thanks. After reading that coroutines will be more useful then I thought :)/>
Ill think of the coroutine Managment.
:)/>