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: micael:gullmes:telenor:se at: 30-Jan-2003 9:31

Hi Gabriele, if it works, that would be a neat solution! Unfortenatly I do not have the time to dig into it rigth now, I have a tight deadline for the project I am working with. I will work around it in a quick'n'dirty & more CPU/memory consuming way. I.e. calling the external program multiple times, not a nice solution, but time is my enemy here. I hope I get some sparetime to start looking into this ata later stage, but since my knowledge about ports are limited, it will probably take lots of time. Brgds /Micael -----Ursprungligt meddelande----- Fr=E5n: Gabriele Santilli [mailto:[g--santilli--tiscalinet--it]] Skickat: den 29 januari 2003 21:45 Till: Gullmes Micael =C4mne: [REBOL] Re: Command/Pro call interact with external program using STDIO 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: