This works,
Public Sub Form_Open() Dim iIndex As Integer iIndex = FMain.GetIndex(sPID) If iIndex = 0 Then Return Inc Application.Busy Exec ["get_iplayer", "--info", iIndex, "--nocopyright"] For Read As "Contents" Dec Application.Busy End Public Sub Contents_Read() Dim sData As String, sLine As String, sName As String Dim i As Integer, iPos As Integer, iPID As Integer Read #Last, sData, -255 $sBuffer &= sData Do iPos = InStr($sBuffer, "\n") If iPos = 0 Then Break sLine = Left($sBuffer, iPos - 1) $sBuffer = Mid$($sBuffer, iPos + 1) If InStr(sLine, "name:") > 0 Then txbName.Text = Trim(Mid(sLine, 6)) Endif sDisplay &= sLine & gb.NewLine TextArea1.Text = sDisplay Loop End Public Sub Contents_Kill() Dec Application.Busy End Regards Bill Lancaster -- View this message in context: http://old.nabble.com/Get-Output-of-Shell-or-Exec-in-TextArea.-tp33446832p33449189.html Sent from the gambas-user mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user