Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Command/Pro call interact with external program using STDIO

From: micael:gullmes:telenor:se at: 29-Jan-2003 11:01

Hi list, has anyone done a nice solution for interacting with external programs multiple times using call and STDIO? What I need to achieve is to 1. start an external program 2. send data throught STDIO as input to the external program 3. retrieve the result from STDIO 4. send data throught STDIO as more input to the external program 5. retrieve the result from STDIO4. 6. And so forth until all is done, then I send a ctrl-c to stop the external program. Example: ---------------------- call "format a:" Insert new diskette for drive A: and press ENTER when ready... <---- send newline Checking existing disk format. Formatting 1.44M Format complete. Volume label (11 characters, ENTER for none)? <---- send "volume x" 1,457,664 bytes total disk space 1,457,664 bytes available on disk 512 bytes in each allocation unit. 2,847 allocation units available. Volume Serial Number is 1E27-16DA Format another (Y/N)? <---- send "N" -------------------------- Is there anyone that has a solution for sending info to the external program from rebol? Brgds /Micael