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

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

From: g:santilli:tiscalinet:it at: 29-Jan-2003 21:44

Hi Gullmes, On Wednesday, January 29, 2003, 2:41:12 PM, you wrote: GM> ;-------Fantasy example 1 GM> stdio: open/call %"format a:" GM> if equal? copy stdio "Insert new diskette for drive A: and press ENTER when ready..." [ GM> insert stdio "Y" GM> ] GM> print result: copy stdio GM> close stdio GM> ;-------End Fantasy example 1 Actually REBOL allows you to do something very close to that. CALL allows you to pass a port for the /INPUT and /OUTPUT refinements. You could write your own port handler to have the functionality you desire. I cannot guarantee that it will work because I know there are some problems if the way CALL handles IO redirection, but in theory it should work. :-) Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r