Programming and Scripting :: Lua looping
I've been playing with Lua, FLTK, Flua, whatever....
Took me a while to realize I was using the doco from version 5 but DSL has version 4 of the product. Does someone have a link to the doco or a tutorial for version 4?
I'd like to be able to read a value from /proc/net/wireless and display it in window. That part I already have done. The problem I'm having is that I'd like to put this process in a loop that repeats every n seconds. Each iteration of the loop would update the display. The loop would stop when a button is clicked in the window.
If anyone knows a site with some looping examples I'd like to see it.
Also... Is it possible to pass a Lua program a parm from the command line?
http://www.lua.org/manual/4.0/
As far as I know, Lua in DSL isn't really Lua. It uses the Lua4 syntax, but it's possible that its functionality is limited.
http://lua-fltk.sourceforge.net/
You can pass a parameter to a flua script by invoking it with the -f option:
#!/bin/flua -f
original here.