Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: xmessage or lua fltk, kinda neat trick....< Next Oldest | Next Newest >
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: April 29 2006,02:51 QUOTE

Just messing around with some stuff, and i noticed that lua-fltk will read stdin as a file.  I'm sure there are piles of uses for this, but the first one that came to mind is that flua can emulate xmessage from a shell script or xterm.  I know Robert has made a popup script for this purpose (or something very similar) already, and now i'm starting to wonder if xmessage might be easily replaced by a few lines of code.
Code Sample
echo "fl_message(\"some text\")"|flua

Code Sample
echo -e "fl_message(\"some text\")\nfl_message(\"some more text\")"|flua

This might be expanded to use a browser for displaying a text file, and accept xmessage parameters...it seems as though a tiny script could fully and seemlessly replace xmessage.  The thing i'm not sure of is how the exit codes could be implemented.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
Glacial Offline





Group: Members
Posts: 16
Joined: Feb. 2006
Posted: May 04 2006,16:52 QUOTE

echo 'fl_message("Some Text 2")'|flua

Works with out the back slashes.

However fl_alert does not?  The lua FTLK manual has like 3 lines that says these FTLK standard dialogs are there but I've been having trouble finding examples or documentation for them.  I've found doc for them at the FLTK site but it's of no help.  fl_alert( char *, ...)    All of the fl_dialogs show the ", ...)" which is??


--------------
-=end of line=-
Back to top
Profile PM 
dare2dreamer Offline





Group: Members
Posts: 113
Joined: Feb. 2005
Posted: May 04 2006,19:57 QUOTE

Ok, you get beer money when you fully replicate zenity in flua. :-)

--------------
----dare2dreamer.
Back to top
Profile PM WEB ICQ AOL MSN YIM 
Glacial Offline





Group: Members
Posts: 16
Joined: Feb. 2006
Posted: May 04 2006,23:04 QUOTE

zenity exists on my CD?

--------------
-=end of line=-
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: May 05 2006,04:05 QUOTE

Quote (Glacial @ May 04 2006,12:52)
However fl_alert does not?  The lua FTLK manual has like 3 lines that says these FTLK standard dialogs are there but I've been having trouble finding examples or documentation for them.  I've found doc for them at the FLTK site but it's of no help.  fl_alert( char *, ...)    All of the fl_dialogs show the ", ...)" which is??

I noticed that too.  According to the docs, lua-fltk was a 1-weekend project, so my guess is that Mr. Carlson did what he felt like doing at the moment and never really finished it.  There are actually several standard fltk widgets that have little or no functionality in lua fltk.

--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
6 replies since April 29 2006,02:51 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: xmessage or lua fltk

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code