mikshaw
Group: Members
Posts: 4856
Joined: July 2004 |
|
Posted: Feb. 14 2006,04:00 |
|
You probably don't want to use an execute as the callback for an input field, as the callback is usually done with every change to the input field (every key pressed would cause the execute to run). Best idea would be to have a button that has a callback related to the contents of the input field.
Code Sample | input = Input{70,35,300,30,"scanbus #'s"} input_button = Button{70,65,80,30,"scanbus"} function input_button.callback() execute("aterm -e cdrecord blank=fast dev="..input.value.." &") end
|
You'd still need some way to read the output of that command back into flua, since it doesn't work the same way that a shell like bash would...so if you redirect the command's output to a file, you can read the contents of that file back into flua if it needs to be displayed or otherwise used in your flua script.
-------------- http://www.tldp.org/LDP/intro-linux/html/index.html
|