when I use this command in terminal
/usr/local/bin/hear -d -i /Users/george/Downloads/notebook.mp3 > test.txt
It executes a program which converts a mp3 to text. This works.
When I try the purebasic code below I always get an error.
Code: Select all
Compiler = RunProgram("/usr/local/bin/hear", "-d -i /Users/george/Downloads/notebook.mp3 > test.txt", "",#PB_Program_Open | #PB_Program_Read)
  Output$ = ""
  If Compiler
    While ProgramRunning(Compiler)
      If AvailableProgramOutput(Compiler)
        Output$ + ReadProgramString(Compiler) + Chr(13)
      EndIf
    Wend
    Output$ + Chr(13) + Chr(13)
    Output$ + "Exitcode: " + Str(ProgramExitCode(Compiler))
    
    CloseProgram(Compiler) ; Close the connection to the program
  EndIf
  
  MessageRequester("Output", Output$)
Thanks


