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

Several Commands

Started by Resistance128, 27 March 2012 - 08:53 PM
Resistance128 #1
Posted 27 March 2012 - 10:53 PM
So I've had ideas for programs that I cant complete because I don't know what the command is, or how to use it. Some of these are:
How to input a player's name withing a print or textutils.slowPrint command
How to check if there is a specific file on a disk and check whats inside of it.
How to use the "shell.run()" code when the program requires spaces, such as edit, or eject.
Any help on any of these would be hugely apreciated. Thanks!
Resistance128 #2
Posted 27 March 2012 - 10:56 PM
Oh, and does anyone know how to disable the use of the terminate command? I'm trying to make a stronger password protection startup program on my personal computer on a server.
Wolvan #3
Posted 27 March 2012 - 11:08 PM
ok I can help you:
print("PLAYER_NAME")
disk.hasData(SIDE) (type help disk for the complete functions of the disk API. Works with every API)
shell.run(Command, Parameter1, Parameter2…) (for example shell.run("edit", "Hello") would start the program edit Hello or shell.run("copy", "startup", "disk/startup") Copy startup to disk as startup

and to make it terminate safe? try to write this at top line: os.pullEvent=os.pullEventRaw