2010/12/18 ugaciaka <[email protected]> > Hi, > > this is an example of what I do > =================================================== > > procedure TfrmMain.btnConvertClick(Sender: TObject); > var > enumFile : TStringsEnumerator; > AProcess: TProcess; > AStringList: TStringList; > begin > enumFile := clbFile.Items.GetEnumerator; > AProcess := TProcess.Create(nil); > AStringList := TStringList.Create; > > while enumFile.MoveNext do > begin > AProcess.CommandLine := 'flac -cd /home/ugaciaka/prova/prova.flac > + | lame -h -b 320 - /home/ugaciaka/prova.mp3'; >
Try: AProcess.CommandLine := 'sh -c "flac -cd /home/ugaciaka/prova/prova.flac + | lame -h -b 320 - /home/ugaciaka/prova.mp3"'; Tip: http://code.google.com/p/lazsolutions/source/browse/trunk/Core/LSUtils.pas?r=177#34 > AProcess.Options := AProcess.Options + [poWaitOnExit, poUsePipes]; > AProcess.Execute; > AStringList.LoadFromStream(AProcess.Output); > AStringList.SaveToFile('output.txt'); > end; > AStringList.Free; > AProcess.Free; > end; > ==================================================================== > but not function, *but* if I write > > AProcess.CommandLine := 'firefox gmail.google.com'; > > my process running correctly firefox. > > In first case output.exe is similar to only ouput "lame". > > Any resolution? > > tnx > > ugaciaka > -- Silvio Clécio, *programmer* *ObjectPascal*
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
