Win_Api_Shell.SendKeys.SendKeys
Description
Plays back Keystroke Macros to an application. You can combine keystrokes together in a macro and apply modifiers to them. Generally function keys can be addressed to the MDI window. Other sets of Keystrokes e.g. Sending Ctrl+Home to a Multi line text item are best done in the When-new-item-instance trigger of that item, using the Window_Handle for the item obtained by the Form Builder build-in Get_Item_Property.
Syntax
PROCEDURE Win_Api_Shell.SendKeys
(hWnd IN PLS_INTEGER,
Keys IN VARCHAR2,
RaiseExceptions IN BOOLEAN DEFAULT FALSE);
Parameters
Target
The Window handle of the window you want to send the keystrokes to. You can get this handle by using the GET_WINDOW_PROPERTY built-in.
Keystrokes
The keystrokes that you want to send to the window. Use these characters for modifier keys:
Shift = +;
Control = ^;
Alt = %.
Modifiers can be ?Escaped? by enclosing them in braces {}.
To apply the modifiers to a sequence of keys, enclose the keys in brackets, as in "^(abc)". Other special keys are enclosed in braces thus:
{Backspace}
{Break}
{CapsLock}
{Clear}
{Delete}
{End}
{Enter}
{Esc}
{Help}
{Home}
{Insert}
{NumLock}
{PgDown}
{PgUp}
{PrtSc}
{ScrollLock}
{Tab}
{F1} - {F12}
{Up}
{Down}
{Left}
{Right}
RaiseExceptions If TRUE, then if the procedure fails to send or parse the keystrokes, the explicit PL/SQL exception NO_DATA_FOUND will be raised
Partager