Command Block (API)
From ComputerCraft Wiki
The Command Block API allows you to run commands in a Command Block, using it as a peripheral. (The peripheral can only be used if allowed in the config, which is default to false)
command.getCommand() | Returns the command in the Command Block as a string. |
command.setCommand(string command) | Sets the command currently in the Command Block. |
command.runCommand() | Runs the command currently in the Command Block. |
Note
All Command Block functions are to be used after wrapping the block in a peripheral. example: command = peripheral.wrap("left")