The problem is that the os.pullEvent() halts the program and waits for a new input. In the example below, there is only one Tick. When input is received, the program will Tock then Tick.
That is needed is a Tick, Tick, Tick... until an input is received. Then a Tock & repeat ticks, etc.
I read the forums and about Lua online. Is there an event handler that will not halt the program? Or - a completely different way of accomplishing this task?
--[[ Main loop ]] while true do --[[ Clear events ]] sleep(0) --[[ Repeat until button is pressed... ]] repeat --[[ Do work... ]] repeatedTick() --[[ CAPTURE EVENT ]] event,side,x,y = os.pullEvent() --[[ Repeat... ]] until event == "monitor_touch" --[[ New work and settings based on event ]] tock(x,y) --[[ Repeat entire process... ]] end
thanks-
-Snails











