Added January 2015
xcall MIAMEX, MX_CLRINBUF {,flags, buffer}
MX_CLRINBUF provides a simple way to eliminate all type-ahead from both the server and client input buffers.
Parameters
flags (Num) [in]
Specifies the sum of:
+1) leave kbd locked
+2) set ATE master kbd hold. Same as TAB(-10,AG_HOLDKBD);"2";chr(127).
buffer (String) [out]
string buffer which will return the characters that were cleared from the local input buffer.
Comments
In a standalone Windows or text environment, this just provides another alternative to existing techniques for clearing the input buffer, including TINKEY, GETKEY(0), and INFLD (type "0"). But in an ATE/GUI environment, it provides the additional feature of clearing any input characters which are currently buffered on the ATE client. Those can sometimes create problems when they accumulate silently on the client and then get released to the host unexpectedly.
Note that to minimize the chance of missing input characters currently in transit from the client to the server, it sends an AG_ACK request (with a five second time limit).
Compatibility: requires 6.0.1400.0+ on the server; works with any ATE version. However, for earlier ATE versions, some of the advanced features are unavailable and thus it may not work much better than the existing alternatives mentioned above.
History
2015 January, A-Shell 6.1.1400: Routine added to A-Shell