1 posts
Posted 01 April 2014 - 07:12 PM
I have an advanced computer connected to a moniter and a disk drive but cannot figure out how to make the treasure disk display on the monitor. The treasure disk is "alongtimeago".
Please help!
Thanks in advance. :)
120 posts
Posted 02 April 2014 - 03:20 AM
The only way I can find out is to run the monitor program using shell.run.
Create a file in root (This has disk. rom, etc.) called monlnch.
Type:
shell.run("cd","disk")
shell.run("monitor","alongtimeago")
Then save and exit
Then type monlnch.
monlnch = what you want the name of the launching program to be
alongtimeago = the program you want to launch
Also, you have to hold Ctrl-T to exit the program.
Edited on 02 April 2014 - 01:22 AM
8543 posts
Posted 02 April 2014 - 03:31 AM
The monitor program requires the monitor side as an argument, for instance:
shell.run("monitor top alongtimeago")
7083 posts
Location
Tasmania (AU)
Posted 02 April 2014 - 08:09 AM
The only way I can find out is to run the monitor program using shell.run.
:huh:/>
What's wrong with just typing eg:
cd disk
monitor top alongtimeago
… straight into CraftOS prompt?
120 posts
Posted 02 April 2014 - 08:11 PM
The monitor program requires the monitor side as an argument, for instance:
shell.run("monitor top alongtimeago")
This is what the syntax should be"
shell.run(
string program,
string parameters)
So:
shell.run("monitor","top","alongtimeago")
EDIT: Wow.. How did I correct a.. admin? :rolleyes:/>
:D/>
:)/>
;)/>
Edited on 02 April 2014 - 06:19 PM
1140 posts
Location
Kaunas, Lithuania
Posted 02 April 2014 - 08:16 PM
This is what the syntax should be"
shell.run(string program, string parameters)
So:
shell.run("monitor","top","alongtimeago")
You can put all of your arguments in one string using
shell.run just like in Lyqyd's example.
8543 posts
Posted 02 April 2014 - 11:50 PM
The monitor program requires the monitor side as an argument, for instance:
shell.run("monitor top alongtimeago")
This is what the syntax should be"
shell.run(
string program,
string parameters)
So:
shell.run("monitor","top","alongtimeago")
EDIT: Wow.. How did I correct a.. admin? :rolleyes:/> :D/> :)/> ;)/>
shell.run concatenates its arguments into a single string before parsing out the command, so it doesn't matter either way. You can have any combination, like
shell.run("monitor top", "alongtimeago"), the function doesn't care. Future advice for correcting people: review the ComputerCraft code to be sure you know what you're talking about first. The wiki is not authoritative.
Also, the main point of my post was that you missed the monitor side argument.