|
Is there a way to ignore keyboard input or clear the input buffer for a
display file? I am writing a window to the display with a makeshift
progress bar (activity indicator) using a loop, in the event of a file
lock (during backup). My code works fine, but I've noticed that if I
hit
the Enter key, a subsequent EXFMT operation will process the key stroke.
I'd like to inhibit this, if possible, especially because an end user
could potentially hit the Enter key multiple times during a wait.
Here's
the relevant code:
open(e) EXTTNTBL;
dow %error();
if %subst(dspStsBar: 34: 1) = '.';
dspStsBar = *blanks;
endif;
dspStsBar = %trimr(dspStsBar) + ' .';
write WNDW03;
sleep(DELAY_SECS);
open(e) EXTTNTBL;
enddo;
write EXTTNFMT;
close EXTTNTBL;
. . .
exfmt SCRN01; <== Processes a previous ENTER key stroke
during the loop above
I suppose I could check to see if the Enter key has been pressed and
then
find a way to process it before performing a read operation, but I'd
rather just ignore it or clear the input buffer. I did some searching
in
the DDS manual, online and in the archive, but didn't come up with
anything. If anyone has a suggestion or a better way of accomplishing
this, I would appreciate the advice. Thanks.
Blake
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.