[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject:
- From: antero <antero@...>
- Date: Fri, 8 Aug 2003 14:14:57 +0600
Hello All,
I am using Lua 5.0 and now trying to create Lua command(C-function)
that will stop execution of script, but in such a way that I can later
resume it.
I want to make it work in such a way:
---------script.lua---------
print "Lua: Before Wait";
-- vvvv This is command i'm trying to implement
wait(1);
print "Lua: After Wait";
----------test.c-----------
[...]
printf("The Start!\n");
lua_dofile(L,"script.lua");
printf("Press any key to continue...");
getch();
lua_resumeafterwait(L);
printf("The End!\n");
[...]
---Program Output----------
The Start!
Lua: Before Wait
Press any key to continue...
Lua: After Wait
The End!
--------------------------------
Can it be done? If it can be done, can you give me some advises(how
to implement such command)?
PS Multithreading is not a solution in my case(i have already looked
through Titmouse code)
PPS Excuse my English...
--
Best regards,
Antero Vipunen.