Job Management Partner 1/Software Distribution Automatic Installation Tool Description and Reference

[Contents][Glossary][Index][Back][Next]

AIT_PlayKey

Description

Sends keyboard input information to the active window as if the user had typed that information.

Format

bool AIT_PlayKey  (
  string strKeys     // Character string
);

Parameters

strKeys (input)

Specify a key or a combination of key character strings, or a character string. You can specify a combination of the following characters.

Example:
AIT_PlayKey("ABC") simulates processing for typing a character string of ABC.

The following gives the special keys you can specify.

Special keys that can be specified
{ALT} {ALT_LOCK} {ALT_UNLOCK} {ALT+SHIFT} {APPS} {BACKSPACE} {CTRL}
{CTRL+ALT} {CTRL+SHIFT} {CTRL+ALT+SHIFT} {CTRL_LOCK} {CAPSLOCK} {CAPSLOCK_ON} {CAPSLOCK_OFF}
{CTRL_UNLOCK} {DELETE} {DOWN} {END} {ENTER} {ESC} {F1}
{F2} {F3} {F4} {F5} {F6} {F7} {F8}
{F9} {F10} {F11} {F12} {HOME} {INS} {KANA_ON}
{KANA_OFF} {KANJI_ON} {KANJI_OFF} {LEFT} {LWIN} {LWIN_LOCK} {LWIN_UNLOCK}
{NUMLOCK_ON} {NUMLOCK_OFF} {NUMLOCK} {NUMPAD0} {NUMPAD1} {NUMPAD2} {NUMPAD3}
{NUMPAD4} {NUMPAD5} {NUMPAD6} {NUMPAD7} {NUMPAD8} {NUMPAD9} {PAUSE}
{PGDOWN} {PGUP} {PRNSCR} {PROCESS} {RIGHT} {RWIN} {RWIN_LOCK}
{RWIN_UNLOCK} {SCROLLLOCK} {SCROLLLOCK_ON} {SCROLLLOCK_OFF} {SHIFT} {SHIFT_LOCK} {SHIFT_UNLOCK}
{SPACE} {TAB} {UP} - - - -

Legend:
-: No value.

Example:
AIT_PlayKey("{TAB}") simulates processing for pressing the Tab key.

When specifying a key in combination with the Shift, Ctrl, or Alt key, add the following key operation codes before a regular key text.

Key Key operation code
Shift +
Ctrl ^
Alt %

Example:
AIT_PlayKey("%(N)") indicates that Alt+N key is pressed.
To repeat keys in the same order, type:
{REPEAT n}character-to-repeat{END_REPEAT}

Return values

The return value is true if the function was executed normally, and false if not. If the function has returned false, you can use AIT_GetLastError to acquire an extended error code. The following gives the error code that AIT_GetLastError may return.

Extended error number Error code
87 ERROR_INVALID_PARAMETER