Lua looping

Forum: Programming and Scripting
Topic: Lua looping
started by: newOldUser

Posted by newOldUser on Sep. 24 2005,16:17
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?

Posted by mikshaw on Sep. 24 2005,18:25
< >
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.
< >

You can pass a parameter to a flua script by invoking it with the -f option:
#!/bin/flua -f

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.