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

[REBOL] Re: Q: get key stroke in the console

From: gscottjones:mchsi at: 30-Jan-2003 5:31

From: "Tom Conlin"
> Hi Greg > > it is a good step in the right direction > but I will still need to figure out how > to make the key press not block > untill a return is entered > > I want the script to carry on after each key as it it > had been followed with a return
Hi, Tom, Variation on the theme: c: open/binary/no-wait [scheme: 'console] ;set following to whatever you wish ;intentionally slow at 2 secs so you can "see" the effect wait-duration: :0:2 d: 0 forever [ if not none? wait/all [c wait-duration] [ print to-char to-integer copy c ] d: d + 1 ;let's do other stuff print d ] You can later change the duration to much faster, like :0:0.1 or smaller. HTH. --Scott Jones