Seite 1 von 1

Wie macht (z.B.) sbcompiler.exe dieses Input ()-Verhalten?

Verfasst: 10.01.2016 21:56
von es_91

Code: Alles auswählen

OpenConsole ()

prog = RunProgram ("C:\Program files (x86)\SpiderBasic\compilers\sbcompiler.exe", "/STANDBY", "", #PB_Program_Open| #PB_Program_Read)

Repeat
  
  PrintN (ReadProgramString (prog))
  Repeat
    
    Delay (0)
  Until AvailableProgramOutput (prog)
ForEver
Ich verstehe das nicht, kann mir bitte jemand erklären warum ich in die Konsole etwas eingeben darf?

Re: Wie macht (z.B.) sbcompiler.exe dieses Input ()-Verhalte

Verfasst: 11.01.2016 01:37
von Kiffi
wegen des /STANDBY-Flags:
SpiderBasic Hilfe hat geschrieben:/STANDBY (-sb or --standby) : Loads the compiler in memory and wait for external commands (editor, scripts...). More information about using this flag is available in the file 'CompilerInterface.txt' from the SpiderBasic 'SDK' directory.
CompilerInterface.txt hat geschrieben:When the compiler is started with the /STANDBY (Windows) or --standby (Linux/Mac) switch,
the compiler will wait for commands on the standard input and give any responds to commands
on the standard output. This allows to control the compiler from any language or script that
is able to access the standard pipes of a program. In PB, the 'Process' library can be used
for this. [...]
Grüße ... Peter

Re: Wie macht (z.B.) sbcompiler.exe dieses Input ()-Verhalte

Verfasst: 11.01.2016 08:51
von es_91
Vielen Dank, Peter. :)