- May
- 15,047
- 271
I haven't put this into practice yet but a little test suggests that it will work. I want to run two (could be more) tests simultaneously (with THREAD). Those tests are fairly complicated and I didn't want to write complicated THREAD command lines for starting them. I thought of this approach. Write a "control" BTM that would do this (paraphrasing): write test1.btm and test2.btm and run them with THREAD; I put those two BTMs in NTFS streams (just to see if it worked). The strategy worked. This should be robust since the lines inside TEXT/ENDTEXT are not monkeyed with. When the control btm quits you get a new prompt, possibly mixed in with THREAD output; that could probably be worked around by going to BOL in the threads to overwrite any prompt. I tried a simple TV control sequence in my test; it seemed to work. Here's my test.
Code:
type redirect_to_stream.btm
text > %0:test1.btm
echo ^e[GThis is test1
endtext
text > %0:test2.btm
echo ^e[GThis is test2
endtext
thread %0:test1.btm
delay 1
thread %0:test2.btm
v:\> redirect_to_stream.btm
This is test1
This is test2