Send an action key string with expected host response time. Returns FALSE if there was a timeout waiting for an update.
bool putCommand(String command); bool putCommand(String command, int maxTime); bool putCommand(String command, int maxTime, int syncCount); |
Arguments
HostScreen
Required. HostScreen object.
Command
Required. Command action represented as a mnemonic.
MaxTime
Optional. Time in milliseconds that the command will wait for a host response and keyboard unlock.
SyncCount (advanced)
Optional. For terminal emulation environments with a background listener thread, this count provides a value indicating to the background listener that if a screen change occurs, ignore it if the screen change count is equal to this value.
Remarks
Use the putCommand to send a host action. It returns a long datatype with a nonzero value (TRUE) if MaxTime is 0 or if the screen was updated prior to the MaxTime timeout. Returns zero (FALSE) if there is a timeout waiting for a screen to update or for the keyboard to unlock.
The Command parameter must have a text string in the form of an action mnemonic, e.g. "[enter]" or "[pf3]". Click here for a full list of available key mnemonics.
The MaxTime parameter causes the command to wait the given time (in milliseconds) for the host to respond. Use a 0 for no wait, or -1 for use default as defined for host (omit for same effect).
The putCommand will result in interaction with the host. The putKeys command will result in interaction with the screen.
The following c# example demonstrates the use of the putCommand method:
bool EnterText(HostScreen oScreen, string text, int timeOut)
{
return oScreen.putCommand(text+"[enter]", timeOut);
}
Requirements
Inventu Viewer+
See Also
putKeys | AID / action key Mnemonics
Applies To: HostScreen object
© 2022 Inventu Corporation