I have a script option that comes with Windows Media Encoder. I run it through WSH and configure the STDIN, STDOUT, and STDERR channels for it.
The script starts the encoding and, in the end, waits in a DO loop, checking the status of the encoding object so that the script knows to exit if the encoding stops. (inside the loop just prints a period and sleeps about 2 seconds).
To cleanly exit, I would like to signal a script to stop coding, which will allow it to drop the loop and clear.
I do not (or definitely want) to have a COM object implemented in our application that runs a script - otherwise I would just raise an event. (I will change my mind if it will be easier than I think in C ++)
I thought about just sending it to the character via STDIN to exit, but the problem is that all methods are for the WScript.stdin block. Is there any non-blocking way of reading with stdin or checking characters in some way?
Is it possible to make a stream in VBS? as far as I can tell, you can only perform other processes.
source
share