steve donovan | 13 Aug 2010 11:04
Picon

Re: Re: Help needed: Running external commands from Lua (no os.exec).

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)

Alberto Santini | 13 Aug 2010 14:26
Picon
Gravatar

gtk - switch previous buffer

Using SciTE Buffer Switch code [1], I added in Lua startup script

function switchLastBuffer()

    if buffers[2] ~= null then

        scite.Open(buffers[2]) -- last previous buffer

    end

end

and in User Options File

command.name.6.*=Switch Last Buffer
command.6.*=switchLastBuffer
command.subsystem.6.*=3
command.mode.6.*=savebefore:no
command.shortcut.6.*=Ctrl+6

So I replicated ctrl+tab in windows box.

(if it is a well-known workaround in gtk, I apology)

Regards,
Alberto

[1] http://lua-users.org/wiki/SciteBufferSwitch

--

-- 
(Continue reading)

Lorenzo Donati | 13 Aug 2010 16:21
Picon
Favicon

Re: Re: Help needed: Running external commands from Lua (no os.exec).

Hi Steve!
Thank you for the prompt response!

> Ah, I'm lookiing at the code and I can see that it has a little
> problem with quoted arguments, I'll fix that.
>
>   
Ok, thanks.

> [snip (lots of hints)]
>
>   
Thank you again! Lots of stuff to ponder about!
Best Regards
Lorenzo

--

-- 
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To post to this group, send email to scite-interest <at> googlegroups.com.
To unsubscribe from this group, send email to scite-interest+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scite-interest?hl=en.


Gmane