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
 

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

reply to topic new topic new poll
Topic: i like flua - my first (useful) script< Next Oldest | Next Newest >
struppi Offline





Group: Members
Posts: 93
Joined: Dec. 2004
Posted: Mar. 17 2005,18:09 QUOTE

hi, i really like flua - light and fast, but quite useful.

this little thing is the first script i made that has a real job on my dsl-setup.

Code Sample
#!/bin/flua -f

if getn(arg) == 1 then
  dsl = arg[1]
else
  print("usage: mydsl-load-choice.lua [extension_name]")
  exit(1)
end

if fl_ask("Install DSL-Extension " .. dsl ..  " ?") then
     execute("mydsl-load " .. dsl )
     exit(0)
  else
     return
  end


it is made for all of you who use rox as their filemanager.

just set this script as "run action" for .dsl files and everytime you click on an extension the script will ask you whether to install it or not.

(i made it because of my silly "misclickingthewholeday"-tick)
Back to top
Profile PM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: Mar. 17 2005,19:09 QUOTE

Cool. Thanks for sharing.
This is the oher part of the charter of DSL which I find so rewarding.
That is using scripting instead of compiled C/C++ which promotes the sharing and easily extendable user experience.
Most don't know about Lua. But we do. Small, light, and fast, fits right in. Ain't it fun!
Back to top
Profile PM WEB 
1 replies since Mar. 17 2005,18:09 < Next Oldest | Next Newest >

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

 
reply to topic new topic new poll
Quick Reply: i like flua - my first (useful) script

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