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

Stupid Easy Question

Started by lewisholcombe, 10 March 2013 - 04:05 AM
lewisholcombe #1
Posted 10 March 2013 - 05:05 AM
SOLVED


This is such a stupid question i cant work out for the life of me.
So basically what i want to do is run a program called "power" to the monitor on the back of my computer.
i know i cant do "monitor back power" but i want to run it as a shell.run
Heres the program i have

shell.run("power")
and it returns theres no such program "Monitor"
i also know i could do this

m = peripheral.wrap("back")
-PROGRAM-
But it would take ages to redo the whole program as i have all my words down as print not mon.write, mon.setCursorPos
So how can i run it as a shell.run file?
Tiin57 #2
Posted 10 March 2013 - 05:07 AM

shell.run("monitor", "SIDE", "FILENAME")
theoriginalbit #3
Posted 10 March 2013 - 05:16 AM
you can also do all the params in the one string
shell.run("monitor <side> <filename>")
lewisholcombe #4
Posted 10 March 2013 - 05:30 AM

shell.run("monitor", "SIDE", "FILENAME")
you can also do all the params in the one string
shell.run("monitor <side> <filename>")

tiin57 thanks mate. Worked like a charm
TheOriginalBIT i explained that way didnt work. But thanks for replying any way :)/>
Engineer #5
Posted 10 March 2013 - 12:56 PM
I think you also could do

m = peripheral.wrap(side)
term.redirect(m)
superaxander #6
Posted 10 March 2013 - 07:57 PM
I think you also could do

m = peripheral.wrap(side)
term.redirect(m)
And at the end of course term.restore()