The programs that I want to run in a new tab are starting with the following code:
local appPath = shell.getRunningProgram()
local shellID = multishell.getCurrent()
if shellID == msID then
shell.openTab(appPath)
return
end
--msID is a global variable which has the main shell id stored in it (Which is, as far as I can tell, always 1, so I assume I could change that to ==1)
--the "return" is there to make sure the rest of the program is not running in the main shell.
When I run this in the lua editor it runs perfectly.
But when I run the program outside the lua editor I get the "No such program"-error
So, I think this doesnt work because of something Im not aware of. Therefor my questions are:
1. Why does this not work outside the lua editor?
2. How can I make this work?
Thanks for any help in advance.