SENDKEYS
Usage
TIBCO iProcess Workspace (Windows)
Sends the specified keystrokes to the active window. The active window may be an iProcess window, or another application window.
Syntax
SENDKEYS (keytext)
where keytext is a text string specifying the keys or key combinations to send. Any single key or any key combined with Alt, Ctrl, or Shift may be specified. The maximum number of keystrokes which may be represented by keytext is approximately 80:
• | Printing keys are specified by the corresponding letter, for example "a". |
• | Non-printing keys are specified by a key code included in keytext; for example "{ENTER}". Valid codes are: |
Key |
Code |
Backspace |
"{BACKSPACE}", "{BS}" or "{BKSP}" |
Break |
"{BREAK}" |
Caps Lock |
"{CAPSLOCK}" |
Clear |
"{CLEAR}" |
Delete |
"{DELETE}" or "{DEL}" |
Down Arrow |
"{DOWN}" |
End |
"{END}" |
Enter |
"{ENTER}" or "~" |
Esc |
"{ESCAPE}" or "{ESC}" |
Help |
"{HELP}" |
Home |
"{HOME}" |
Insert |
"{INSERT}" |
Left Arrow |
"{LEFT}" |
Page Down |
"{PGDN}" |
Page Up |
"{PGUP}" |
Print Screen |
"{PRTSC}" |
Right Arrow |
"{RIGHT}" |
Scroll Lock |
"{SCROLLLOCK}" |
Tab |
"{TAB}" |
Up Arrow |
"{UP}" |
F1 to F16 |
"{F1}" to "{F16}" |
• | Key combinations may be specified by preceding the key or keycode with one or more of the following characters: |
To combine with |
Use code |
Shift |
+ |
Ctrl |
^ |
Alt |
% |
To use those characters or the bracket characters in their own right enclose them in brackets:
{+} {^} {%} {{} {}}
Invalid key sequences (for example, an unmatched "{") results in no keys being sent.
Any key sequence directed to the Form Window which would result in the window being closed is intercepted. Use the ISWINDOWS function for this purpose. Similarly, attempting to close the Tools window with the SENDKEYS function should be avoided.
Returns
One of the following numeric values:
Value |
Description |
0 |
Success |
1 |
Failure (for example, too many keys in keytext argument, or unmatched brace) |
Examples
TIBCO iProcess Modeler:
To send the keys "Abc" followed by Enter:
SENDKEYS("Abc{ENTER}")
To send the contents of the text field NAME:
SENDKEYS(name)
To send Alt+E followed by C; these keys normally select the application's Edit Copy facility:
SENDKEYS("%ec")
TIBCO Business Studio:
IPEEnvironmentUtil.SENDKEYS("Abc{ENTER}");
IPEEnvironmentUtil.SENDKEYS("name");
IPEEnvironmentUtil.SENDKEYS("%ec");