wxProcess
BlitzMax Forums/Brucey's Modules/wxProcess
| ||
I'm using this code here:-Local m_versionProcess:wxProcess = New wxProcess.CreateProcess() Local command:String = cmdstring Local m_pid:Int = wxExecute(command, wxEXEC_SYNC, m_versionProcess ) Local p_in:wxInputStream = m_versionProcess.GetInputStream() Local line:String If p_in Then Local textInput:wxTextInputStream = New wxTextInputStream.Create(p_in) While Not p_in.Eof() line = line + textInput.ReadLine() Wend End If m_versionProcess.free gframe.output.AppendText(line+"~n") Which executes an file on Linux that creates some other files, thing is, even though its running, I'm not actually collecting any input data via ReadLine(), yet, instead, MaxIDE is managing to output it, like so:- Building Project Compiling:Project.bmx flat assembler version 1.68 (32768 kilobytes memory) 4 passes, 144487 bytes. Linking:Project Executing:Project <In external app> Filecount: 5 Where I want to read that into my own app (The last two lines), in this case, into a wxControl call 'output'? Oh, and this is for ubuntu! :) Dabz Last edited 2012 |
| ||
Just noticed, the last few replies have just been replied to by the original author... Is this forum still active or what? :/ Dabz |
| ||
In fact, if I remove this bit:-If p_in Then Local textInput:wxTextInputStream = New wxTextInputStream.Create(p_in) While Not p_in.Eof() line = line + textInput.ReadLine() Wend End If It works just the same, calls the process, and the guff from the external executable is churned out in the MaxIDE output page! Dabz |