CNTR+C,Y,ENTER programmatically equivalent
Posted: 29 May 2011 23:40
hi to all,
I would need to have a main slow repeating process inside a loop to make it running or stop it.
The batch idea to use a set /p on top or bottom of the loop, waiting for a key to stop, is good but as process itself could last hours i do not know if keyboard cue is read during the steady u.i. time.
Another way of stopping is CNTR+C,Y,ENTER but it kills the process and loose all temporary stored data by the process.
Among the two the latter is good in contingency, but the sequence is long, do there is any code example to substitute it?
Also, if i remember well, dos choice was able to create a shell for processes waiting a single keypress to escape from it, another way of implementing.
Any suggestion?
Thanks
I would need to have a main slow repeating process inside a loop to make it running or stop it.
The batch idea to use a set /p on top or bottom of the loop, waiting for a key to stop, is good but as process itself could last hours i do not know if keyboard cue is read during the steady u.i. time.
Another way of stopping is CNTR+C,Y,ENTER but it kills the process and loose all temporary stored data by the process.
Among the two the latter is good in contingency, but the sequence is long, do there is any code example to substitute it?
Also, if i remember well, dos choice was able to create a shell for processes waiting a single keypress to escape from it, another way of implementing.
Any suggestion?
Thanks