Difference between revisions of "Multishell.getCurrent"
From ComputerCraft Wiki
Apemanzilla (Talk | contribs) (Make multishell.getCurrent page) |
MKlegoman357 (Talk | contribs) m (Expanded) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | {{Lowercase}} | ||
+ | |||
{{Function | {{Function | ||
− | + | |name=multishell.getCurrent | |
− | + | |api=multishell | |
− | + | |returns={{type|number}} tabID | |
− | + | |addon=ComputerCraft | |
− | + | |desc=Returns the tab ID of the currently running program. You can use this along with other multishell functions, such as, [[multishell.getTitle]] and [[multishell.setTitle]]. | |
− | + | |examples={{Example | |
+ | |desc=Gets the currently running tab and prints it's title. | ||
+ | |code= local currentTabID = '''multishell.getCurrent()''' | ||
+ | |||
+ | [[print]]([[multishell.getTitle]](currentTabID)) | ||
+ | |output=The title of the currently running program (tab)}} | ||
}} | }} | ||
+ | |||
[[Category:API_Functions]] | [[Category:API_Functions]] |
Latest revision as of 17:28, 2 June 2014
![]() | |
Returns the tab ID of the currently running program. You can use this along with other multishell functions, such as, multishell.getTitle and multishell.setTitle. | |
Syntax | multishell.getCurrent() |
Returns | number tabID |
Part of | ComputerCraft |
API | multishell |
Examples
![]() | |
Gets the currently running tab and prints it's title. | |
Code |
local currentTabID = multishell.getCurrent() print(multishell.getTitle(currentTabID)) |
Output | The title of the currently running program (tab) |