ReadProgramString()

语法

Result$ = ReadProgramString(Program [, Flags])
概要
Reads a line from the output (stdout) of the given program. This function waits until there is data available to read from the program. To prevent this wait, AvailableProgramOutput() may be used first to check if there is something to read. This function also waits until a full line of output is available. If not line-based or raw output is to be read, ReadProgramData() may be used.

参数

Program The program to use. It must have been started before with RunProgram() and the #PB_Program_Read flag.
Flags (optional) The string format to use when reading the output. This can be one of the following values:
  #PB_Ascii  : Reads the output as ascii
  #PB_UTF8   : Reads the output as UTF8
  #PB_Unicode: Reads the output as unicode

返回值

A string created from program output.

参阅

ReadProgramData()

已支持操作系统

所有

<- ReadProgramError() - Process Index - RemoveEnvironmentVariable() ->