local GUI = require("GUI")
local component = require 'component'
local thread = require 'thread'
local event = require 'event'
local reactor = component.reactor_chamber
local currentTemps = reactor.getHeat()
-- Create new application
local application = GUI.application()
-- Add panel that fits application
application:addChild(GUI.panel(1, 1, application.width, application.height, 0x262626))
-- Add smaller panels
application:addChild(GUI.panel(4, 2, 23, 4, 0x880000))
application:addChild(GUI.text(5, 3, 0xFFFFFF, "Current Reactor Temps"))
-- Grab a reference to the text object you need to update
local gui_temp = GUI.text(5, 5, 0xFFFFFF, currentTemps)
application:draw(true) -- initial paint
thread.create(application.start, application) -- Start the app event handler as a subprocess of this one
while true do
os.sleep(3) -- Update the element every 3 seconds
gui_temp.text = tostring(reactor.getHeat())
gui_temp:update() -- Signal the app that this element should be refreshed
This is just another attempt in case I missed something... If this doesn't work yet again, then could you run `cat /tmp/event.log` after running this (if it fails), and reply with its output if it's available. Threads and event timers don't throw errors in the main process.
1) yes. The quotes.
2) autorun isn't depricated ( I don't think..) but you might like the .shrc format better.
Run 'edit .shrc' in the home dir and add the path to the file you want to run on the first available line. It's super simple and can have multiple programs to run on startup. Also programs can take shell args just like typing it in yourself.
hello. i have password lock on my computer and i want to run it automaticaly. i looked to internet and i find some about autorun.lua file (HERE) and i create the file, edit /autorun.lua and writed this to it : os.execute(/home/door) (i have file named "door")
i save it and reboot the OS and for 0.3second there is some red text and after it it goes normaly to /home/ menu
i edited the code to os.execute(/home/door.lua) and there is still the same red text and it goes again to /home menu.
what i am doing wrong ?
edit: i recorded the error and slowed down it in sony vegas and looked to error and i have missing quotes
Thank you for your help. Didn't seem to want to update that variable. It will get the first reading when you first run the program up but doesn't want to update properly after that. I may have to refer to the library creator on this.
I would like to use the function .suckFromSlot in a robot so he can suck one item in the slot number 5 from a chest above him.
But I don't understand how to use the function because when I've test some program, I've don't success to use it.
Thank you for helping me.