SendSystemKeys

Sends keystrokes to the Windows operating system. Use this command only when SendKeys fails to perform. You can use SendSystemKeys to send key combinations such as {Ctrl+Esc}, {Alt+Esc}, and {Alt+Tab}.

Syntax

SendSystemKeys "keystroke text"

Argument Description
keystroke text The keystrokes to be sent to the Windows operating system. Enclose the names of nonprinting keys in braces ({ }).

Example

This instruction executes the "Switch to Next Window" command.

SendSystemKeys "{Alt+Esc}"

Notes

  • Do not include spaces between the names of simultaneously-pressed keys, such as Alt+Tab.
  • Any modifier keys (SHIFT, CTRL, ALT) pressed while the SendSystemKeys command executes affect the command action.
  • The SendSystemKeys command sends keystrokes more slowly than the SendKeys command. Also, if the system responds slowly long strings can overflow the system keyboard buffer.