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

Hier kann alles mögliche diskutiert werden. Themen zu Purebasic sind hier erwünscht.
Flames und Spam kommen ungefragt in den Mülleimer.
es_91
Beiträge: 383
Registriert: 25.01.2011 04:48

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

Beitrag 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?
Benutzeravatar
Kiffi
Beiträge: 10621
Registriert: 08.09.2004 08:21
Wohnort: Amphibios 9

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

Beitrag 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
Hygge
es_91
Beiträge: 383
Registriert: 25.01.2011 04:48

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

Beitrag von es_91 »

Vielen Dank, Peter. :)
Antworten