lua-users home
lua-l archive

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


This is the famous 'black box' problem with os.execute on Windows. The
only way to get around it is a special version of execute (like I do
with SciTE). But in that case, you have to be able to dynamically load
extensions anyway, and could pull in the Win32 Sleep function.

The question is, does this application export its Lua symbols? Or,
alternatively, does it link in Lua dynamically? (typically if there's
a lua51.dll or something like that). In that case, I can help you with
an extension.

Although, having to _wait_ in a script seems awkward. Depending how
this app's threading works, this would lock things up totally.  Does
this app have some kind of callback mechanism?

steve d.

On Wed, Mar 12, 2008 at 10:22 AM, Rolf <rb@san.rr.com> wrote:
> I downloaded MSN sleep program here:
>  http://unattended.msfn.org/unattended.xp/view/web/10/
>
>  then tried:
>
> function test()
>         for i=1,3 do
>                 os.execute("sleep.exe 5")
>                 msgbox(i)
>         end
>  end
>
>  This seemed to work, except that I got a cmd window that opened and stayed
>  open?