PAP what is your idea about making a program that take screen shuts while a CPLua program is running?
I want to use debug->hook functions so there wouldn't be any need to adding a call or making any change in other programs to call function which take a screen shut.Maybe something like a spy!
Huh...

I understand your idea, but... Man, this is a
calculator 
each new capture of the screen uses 5 Kb of memory. Using several hundreds of Kb for a video would not be reasonable... People using your program would get a "not enough memory" error quite easily, even if there is a lot of memory available. I'm not against your idea, but I think it's not really suitable for the Cla$$Pad

But I know that Orwell didn't add these two function to debug package in CPLua 0.9C.
I should ask him for his plane about hook functions. 
You like technical stuff huh?
Well... In fact the problem is that CPLua is
already using a hook

I need this hook to check for external events while the interpreter is running (key press, pen move, button press, menu open, break, etc), otherwhise the CP would be completely frozen until the Lua program ends.
With the debug functions you would have the possibility of replacing this hook by another, and this would give some catastrophic results
It's possible to call some lua functions from this special hook btw. If people are interested it would be possible to define a function which would be called automatically by this hook.

You wouldn't have the possibility of changing the hook's frequency however - it's currently called only a few times per second.
Another thing: I'm thinking about a new function
ui.timer() for the UI package... With this you could call a function periodically at a custom frequency (for example to update the content of a window). It would only be usable with the UI package, but maybe it could be helpful