while true do
local e = { computer.pullSignal() }
if e[1] == "key_down" and e[4] == 41 then
break
end
end
NVM. The problem was in 'sleep' that goes right after event loop. Now it works like a charm.
When I run this code in EEPROM it gives me one excess Filesystem, but I have no hard disks attached, wtf :/
dev_info = computer.getDeviceInfo()
__DrivesCount = 0
for k, v in pairs(dev_info) do
if v.class == "volume" or v.class == "disk" then
__DrivesCount = __DrivesCount + 1
writeScroll("Auto-Detecting SATA "..__DrivesCount.."..."..v.description)
end
end
CptMercury,
Thx, I already found a solution for anything but only tier. Didn't bother though, as it included in "product".
for k, v in pairs(dev_info) do
if v.class == "processor" then
_ProcessorName = --[[v.vendor.." "..]]v.product
if v.clock == nil or v.clock == "" then else
v.clock = v.clock:match"[^+]*"
_ProcessorClock = v.clock.."Hz"
end
end
end
Actually yours "tonumber((info[k].product):match("%d"))" can be useful too.
I cannot find any info about how to use this thing.
------------
# lua
lua> computer.getDeviceInfo()
Lua interpreter only gives me some truncated complicated table.
@DarkPikachu Me, I never read licenses for software I downloaded and didn't going to in future. And this situation reminds me South Park S5E1, this lic can be just funny reference.
Did you read any of this giant soft licenses, like this? I'm going to die faster than read it all. "War and Peace Volume 1".
Didn't you understand humor? Don't be so naive and don't take this seriously. And why did you even read license? I look at you from here, Novorossia (Part of Ukraine, close to Russia), and think that this thing for you is like a god... Generally speaking, such an impression that the author will travel to you from Russia to your Pindostan only in order to fuck.