SendKey

Sends a sequence of keys to the display session.

Parameters
KeyStr
String of key codes. See the Remarks section for a complete listing of valid key codes and descriptions.
Returns
0 for success; or a non-zero error code. Refer to Error codes for a complete listing of error code descriptions.
Remarks
The SendKey function affects the host screen as if the user were typing on the keyboard.
Refer to the following tables for a list of host function keys and their corresponding codes. If a character is used in the code, then the case of the character is important.
Note: If you want to use the “at” sign (@) in the data string you must use the two-byte code “@@”.
Example 1
Example 1 utilizes friendly syntax. For example, <TAB> for TAB and <Enter> for ENTER.
Set bzhao = CreateObject( "BZWhll.WhllObj" )
bzhao.Connect "A"
bzhao.SendKey ""John<Tab>Smith<Enter>"
bzhao.WaitReady 10, 1
Example 2
Example 2 utilizes the older mnemonic syntax. For example, @T for TAB and @E for ENTER.
Set bzhao = CreateObject( "BZWhll.WhllObj" )
bzhao.Connect "A"
bzhao.SendKey "John@TSmith@E"
bzhao.WaitReady 10, 1