George,
   I've  run into that before - it's probably network latency. If there's
   nothing  in  your  keyboard  buffer,  your  routine  will  bail.  If a
   multi-character keystroke gets broken between packets, that can happen.
   Experiment with a delay before the INPUT TEST,-1 to allow the network to
   catch up with you. It takes some tweaking, but faster hardware lessens the
   effect. Of course, if you're not networked in any way, then I'm probably all
   wet. I've been there before.
   Regards,
   Charlie Noah
   Inland Truck Parts Company
   George Gallen wrote:

I Tried to write something similar, but kept getting random program lockups or 
universe
   bombouts. What I was trying to do was as letters were being typed, fine tune
 a listing
   to the right. Also, I tried to make a full screen editor, allowing the arrow
s to allow
   the user to move from field to field, and the insert key would function as e
xpected.

Because I was only taking one key at a time, I had to use KEYIN (otherwise back
space wouldn't
   trigger the routine as a key typed, or a function key would be returned as o
nly the first
   character of the key.

Most of the time it worked, just everynow and again, it would blow up, and I co
uld never
   figure out why (although I was told it was most like something in the keyin(
) internally).

The gist of the routine is below: It requires you to roll your own input routin
e, that is
you have to check for an "ENTER", and check for a "backspace", then remove the 
last char
from BUFFER.

1000:
   INPUT TEST,-1:
   LOOP WHILE(TEST="1") DO
      BUFFER=BUFFER:KEYIN()
      INPUT TEST,-1:
   REPEAT
   RETURN

George

-----Original Message-----
From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-
us...@listserver.u2ug.org] On Behalf Of Norman, David (Health)
Sent: Wednesday, March 11, 2009 11:27 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] UV Timed INPUT

I'm sure I've seen something about this recently, but I've searched the
past 2 years with no luck. I want to do a timed INPUT in UV - if after
n
seconds the Enter key hasn't been pressed, do something.
Anyone got any clever ways of doing this ?

Thanks,
========================
David Norman
Senior Software Engineer - SA Ambulance Service

ICT Services
SA Health
Government of South Australia

Box 3, GPO
Adelaide, South Australia 5001
*+61 8 8274 0384
* fax +61 8 8271 4844
* norman.da...@saambulance.com.au

This e-mail may contain confidential information, which also may be
legally privileged. Only the intended recipient(s) may access, use,
distribute or copy this e-mail. If this e-mail is received in error,
please inform the sender by return e-mail and delete the original. If
there are doubts about the validity of this message, please contact the
sender by telephone. It is the recipient's responsibility to check the
e-mail and any attached files for viruses.
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to