shell.openTab

From ComputerCraft Wiki
Jump to: navigation, search


Grid Redstone.png  Function shell.openTab
Added by ComputerCraft 1.6, runs program with as many specified arguments as are provided, in a new tab (and returns the ID number of that new tab). As access to the Multishell API is a requirement, this command is only available to advanced systems.

Essentially takes all parameters passed to it and runs them as one line - for eg, shell.openTab("edit","myScript") is the same as shell.openTab("edit myScript"), and you can use whichever syntax happens to suit you.

See also: shell.run(), shell.switchTab()
Syntax shell.openTab(string program [, string args1, string args2, ...])
Returns number newTabID
Part of ComputerCraft
API shell

Examples

Grid paper.png  Example
Runs the program "falling" in a new tab, and switches to it with shell.switchTab():
Code
shell.switchTab( shell.openTab("falling") )
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox