13 Aug 2010 11:04
Re: Re: Help needed: Running external commands from Lua (no os.exec).
steve donovan <steve.j.donovan <at> gmail.com>
2010-08-13 09:04:37 GMT
2010-08-13 09:04:37 GMT
On Thu, Aug 12, 2010 at 6:45 PM, Lorenzo Donati <lorenzodonatibz <at> interfree.it> wrote: > local command = local command = [["G:\root\main\prg\SciTE\app\wscite > \SciTE.exe" "G:\root\main\prg\SciTE\libs\snippets > \CompareWithOriginalSnippet.lua"]] > spawner.popen(command) > > don't (note that the second path is quoted). Ah, I'm lookiing at the code and I can see that it has a little problem with quoted arguments, I'll fix that. > P.S.: I skimmed through the source code for spawner-ex.dll and I saw > it registers a bunch of functions which seem quite useful. Is there > some specific documentation on their usage available (even some sort > of bare API docs would do, such as basic usage, parameters in, > parameters out, return values, limits)? My bad, always forgot about documentation ;) You correctly note that it really should be called spawner.dll and then require() will work out of the box. out = spawner.popen(cmd) -- does prepend cmd.exe /c (depends on COMSPEC) This can be useful because you can both write to a process and then read from it. inf,out = spawner.popen2(cmd) These are file objects, but I couldn't work out how to make them(Continue reading)
RSS Feed