Issues keystrokes to an external application or to the current Newlook session.
This method is typically used to send Aid keys to the host from Newlook.
If you need to navigate to a field and populate it with a string the best way of doing this is to use the SetActiveControl method to position the cursor, use the SetValue action to assign the value to the Text property of the control, then use SendKeys to send the Enter key to the host. Typically the use of SendKeys to navigate and populate fields is not recommended. This action should be reserved for sending Aid keys to the host. In addition, this action is not recommended for sending more than a handful of characters to an external application, due to speed restrictions. A far better approach is to use an alternative communication method such as COM if the external application supports it.
If you are using this method with the OnReceive or OnRefresh events of a form then you will need to set the Wait parameter to No.
Application - (Optional)
Specifies the name of the target application for the keystrokes. Newlook attempts to find this application in two ways. It enumerates the top-level windows and will match either the first window found whose program name matches the Application parameter (e.g. Notepad.exe) or if the window’s title matches the Application parameter (e.g. “Untitled – Notepad”). If no application is found, then the keystrokes are not sent. If this parameter is left blank, then the keystrokes are sent to Newlook. To specify the application as an expression, prefix the application with an equals (=) sign.
Keystrokes - (Required)
Specifies the keystrokes to issue. Non-character keystrokes can be specified by enclosing the key name in braces, as follows: Shift, Control, Alt and AltGr key combinations can be specified using {Shift+}, {Ctrl+}, {Alt+} and {AltGr+} with the keystrokes. For example, {Ctrl+s} will issue the Control and s key combination.
You cannot send certain keys that generate interrupts rather than character codes, such as {CTRL+ALT+DEL} .
{Attn} |
{Clear} |
{End} |
{Erase EOF} |
{Field -} |
{Help} |
{Home Field} |
{Local Help} |
{New Line} |
{Page Up} |
{Reset} |
{Sys Req} |
{Test Req} |
{F1} … {F24} |
{Back Tab} |
{Down} |
{Enter} |
{Field +} |
{Field Exit} |
{Home} |
{Left} |
{Local Print} |
{Page Down} |
{Print} |
{Right} |
{Tab} |
{Up} |
{PA1} … {PA3} |
|
|
If you are issuing a key combination via SendKeys, for instance {Ctrl+a} you will need to specify the character key in lowercase and ensure there are no spaces inside the braces.
Wait - (Required)
Specifies whether this action should finish executing completely before executing the next macro line. This option must be set to Yes if used in conjunction with silent navigation (i.e. if the app.ShowForms property has been set to False in a prior macro action).
© 2004-2021 looksoftware. All rights reserved.