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

[REBOL] Re: Console port and network ports

From: g:santilli:tiscalinet:it at: 11-Aug-2002 13:53

Hi Maarten, On Sunday, August 11, 2002, 9:19:27 AM, you wrote: mk> Is there a way to add a network port and a console port in one wait/all mk> block? This works here: wait/all [net-port console-port] What's the problem? mk> So I can process network events and console events, and once I mk> have a complete "line" from the console do something with it. If you use port/awake, remember to return FALSE when you want your port to keep waiting, TRUE when you want WAIT to return. (I think you know all this...) mk> And how do I capture the control characters in /Core (up tab down etc.) They'll come as escape sequences.
>> p: open/binary/no-wait console:// >> forever [wait p print mold copy p]
#{1B5B41} ; up #{1B5B42} ; down #{1B5B43} ; right #{1B5B44} ; left Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r