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

shell.run after term.redirect won't draw anything.

Started by MarcoPolo0306, 03 August 2018 - 06:49 PM
MarcoPolo0306 #1
Posted 03 August 2018 - 08:49 PM
I am trying to add something like a topbar to an os, sorta focused on multitasking. It returns no error. Any help would be appreciated!

Kernel:
Spoiler

--[[
Panthera Kernel File
8/3/2018
--]]
local cMain = term.current()
local x,y = term.getSize()
local function topBar()
local barWindow = window.create(cMain,1,1,x,1,true)
term.redirect(barWindow)
shell.run("panthera/core/tpbar.lua")
term.redirect(cMain)
end
parallel.waitForAll(topBar)

Topbar Script:
Spoiler

--[[
Panthera Topbar Script
8/3/2018
--]]

local function drawBar()
term.setCursorPos(2,1)
term.setBackgroundColor(colors.lightBlue)
term.clearLine()
term.setBackgroundColor(colors.gray)
term.setTextColor(colors.lightGray())
print(" Menu ")
end

drawBar()
Bomb Bloke #2
Posted 04 August 2018 - 01:54 AM
Your top bar script is missing a bracket and won't execute as-is. Run it on its own to get the error.