pub.freeprocess
BlitzMax Forums/BlitzMax Programming/pub.freeprocess
| ||
I have managed to start an external player with the freeprocess module. The player is started in a slave mode where it can recieve commands via STDIN, but I do not know how to do so using the freeprocess, but I am almost certain that it should be possible. Do anyone have any examples of how to start and communicate with an external program using the pub.freeprocess module? |
| ||
It should be process.pipe.WriteLine() but I am having trouble getting that to work. MaxIDE itself has a somewhat harry example in the form of TOutputPanel (maxide.bmx, line 1709 or so). I am trying to pull that apart. This thread has an example of reading data: http://www.blitzmax.com/Community/posts.php?topic=67787 |
| ||
- |
| ||
I am having no luck with that either. I will take another look at that tomorrow, its way too late now and I got the get some sleep before work tomorrow. I am looking forward to hear if you discover anything useful. |
| ||
Didn't get a chance to look at this yet. Should be able to tomorrow or maybe a bit tonight. |
| ||
I got it working with Mplayer. I had overlooked that I needed a line change at the end of the command.Local pipe:TPipeStream pipe=test.process.pipe pipe.WriteLine( "pause"+Chr(10) ) I the above example, I have a process called "test", I then get the pipe from that process and writes a line to it. In this example the command "pause" with the added line change on the end. So at least I can get on with my application, and I hope that it helps others as well. |
| ||
So WriteLine doesn't add a line change? Weird. |