Example
The following is an example of using the SendKeys method.
//-------------------------------------------------------------------
// ECLPS::SendKeys
//
// Sends a series of keystrokes, including 3270 function keys, to
// the host on connection A.
//-------------------------------------------------------------------
void Sample62() {
ECLPS PS('A'); // PS object for connection A
// The following key string will erase from the current cursor
// position to the end of the field, and then type the given
// characters into the field.
char SendStr[] = "[eraseeof]ZIEWin is really cool";
// Note that an ECL error is thrown if we try to send keys to
// a protected field.
try {
PS.SendKeys(SendStr); // Do it at the current cursor position
PS.SendKeys(SendStr, 3, 10); // Again at row 3 column 10
}
catch (ECLErr Err) {
printf("Failed to send keys: %s\n", Err.GetMsgText());
}
} // end sample