i like flua - my first (useful) script


Forum: DSL Ideas and Suggestions
Topic: i like flua - my first (useful) script
started by: struppi

Posted by struppi on Mar. 17 2005,18:09
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)

Posted by roberts on Mar. 17 2005,19:09
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!

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