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

Run a craftOS program within a program

Started by zedekblue, 19 May 2013 - 09:46 PM
zedekblue #1
Posted 19 May 2013 - 11:46 PM
My objective:
Have the craftOS command "monitor top ls disk" run and refresh every ten seconds.
So far I haven't been able to figure out how to do this. I'm not finding any API's that run the same way as the ls command, and both shell.run and os.run don't work either, as far as I can tell.
Thanks for your help!
theoriginalbit #2
Posted 20 May 2013 - 12:32 AM
what did you try with shell.run? you may be using it wrong because that should work fine as long as the string inside of the function call looks exactly as you typed it in the OP.
zedekblue #3
Posted 20 May 2013 - 12:53 AM
shell.run(monitor top ls disk)
returns an error: bios:338: [string "test"]:1: ')' expected


Got it… Needed the quotes. Totally wouldn't have guessed if you hadn't said 'as long as the string inside the function'

Thanks!