In article <11**********************@h48g2000cwc.googlegroups .com>,
Joyrider <rl*******@shaw.cawrote:
>I have a small piece of
code used in a hand held data collector. Its purpose is to pad zeros
to the front of a scanned barcode so its length is 14 char. What I
want is for an ENTER to be suffixed so the user does not have to press
the Enter button after the scan and padding.
Do I understand correctly that there is some kind of forms processing
going on, and after you fill in that field of the form, you want to
trigger the forms input routine for that field, as if the user had
typed in the value and triggered the input routine themselves?
If that is the case, then there is no way in Standard C to do that.
Standard C can create output, but arranging for that output to trigger
input is beyond the specifications of C itself.
There might be ways available through the facilities provided by
your forms package, but you would have to check a newsgroup or
source more familiar with that package to find out.
It is not the ENTER or return itself that concerns you, right? It is
the action that ENTER or return would trigger that you want to
trigger, right?
Some forms packages have no way of doing this. Others rely on hacks
like telling the output device to program the "answerback" sequence
and then sending a "who are you" request to get the device to emit
that string as if the user had entered it. Others rely upon
"synthetic key presses" being generated. Lots of different ways,
most of them ugly and a pain to use.
--
There are some ideas so wrong that only a very intelligent person
could believe in them. -- George Orwell