Skip to content
IgorTimofeev edited this page Jan 9, 2019 · 7 revisions

This library provides an event system for registering specific event handlers. For example, it's used to automatically mount added filesystem components or to run some tasks regularly with specified interval. There's also important interrupting feature for instant killing not responding scripts.

event.pull(...): ...

Works the same way as computer.pullSignal(...) do, but also calls registered event handlers if needed and check interrupting status:

while true do
  local e1, e2, e4, e4 = event.pull()
  if e1 == "touch" then
    -- Do something when touch event was received
  end
end
Clone this wiki locally