lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 21/05/2008 15:30, gary ng wrote:
Yes, but you need to specfically write such a
script(to support DND)

With the proper file association, files you drag'n'drop on the script are seen as parameters to the script. No special coding needed.

and as I said in another post,
these things better use a different extension(like
.wlua) to seperate them from the standard .lua which
can be a module, a command line that needs no
argument, a command line that print a help screen.

I agree with you here, it is a good idea to distinguish pure command line utilities from stuff popping out message boxes or GUIs...

There may be a reason 'for' it like running
'myscript.lua' in the command window instead of 'lua
myscript.lua' but personally I don't find it to have
such an advantage over the 'double-click' case I think
do more harm than good.

Just to be clear: you can perfectly set a file association to .lua that doesn't support double click for running it. Such default action can be edit, or anything else. Or nothing. At "worse", file association can be used only to define an icon and a file type description for Lua scripts in Windows Explorer (and compatible programs). That's what I did for PHP files, which are rarely run from the command line, even less with double-click!

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --