On Wed, Mar 12, 2008 at 10:51 AM, Rolf <
rb@san.rr.com> wrote:
Maybe I am naively trying to do something that is not possible (I have very
limited "programming" experience).
The whole idea was to have the script periodically check (e.g. every 10 min)
for certain things in the database, and if conditions were satisfied, then
take actions.
However, at the same time, I need to be able to use the program. Maybe this
is simply not possible. The wait function may simply lock the program as you
and others have suggested.
-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of steve donovan
Sent: Wednesday, March 12, 2008 1:41 AM
To: Lua list
Subject: Re: NEWBIE Question: LUA wait() function?
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?