By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

AutoIt Send Function

Used to send simulated keystrokes to the active window.

Edited: 2015-02-12 23:53

The AutoIt Send Function is used to simulate keyboard input, sending keystrokes to the window that is currently active.

Parameters

The send function will accept two parameters. The first is the keys to send, the second is an optional flag value.

KeysKeys, kay combination, or sequence of keys to send.
Flag1. Ignore Special Characters (sending raw text) – 2. Special Characters are not ignored..

Send Command Refference

Special Keys.

!ALT – I.e. [!a] (would send ALT+a)
+SHIFT – I.e. [+ab+cd] (would result in AbCd)
^CONTROL – I.e. [^2] (would send CTRL+2)
#WINDOWS KEY – I.e. [#r] (would press WKEY+r – opening the run command in windows)

Keycode Reference

{SPECIAL CHARACTER}Will escape the character if flag is set to 0 – I.e. [{{}abc{}}] (Results in: {abc})
{KAY 3}Presses the KEY for the given count – I.e. [{a 5}] or [{SPACE 3}]
{SPACE}SPACE
{TAB}TAB
{ENTER}ENTER
{ALT}ALT
{BACKSPACE} or {BS}BACKSPACE
{DELETE} or {DEL}DELETE
{UP}UP Arrow
{RIGHT}RIGHT Arrow
{DOWN}DOWN Arrow
{LEFT}LEFT Arrow
{HOME}HOME
{END}END
{ESCAPE} or {ESC}ESCAPE
{INSERT} or {INS}INSERT
{PGUP}PAGE UP
{PGDN}PAGE DOWN
{F1} to {F12}The F keys
{PRINTSCREEN}PRINT SCREEN
{LWIN}LEFT WINDOWS KEY
{RWIN}RIGHT WINDOWS KEY
{NUMLOCK on}NUMLOCK – on/off
{CAPSLOCK off}CAPSLOCK – on/off
{SCROLLLOCK on}SCROLLLOCK – on/off
{BREAK}For CTRL+BREAK processing
{PAUSE}PAUSE
{APPSKEY}WINDOWS APP
{LALT}LEFT ALT
{RALT}RIGHT ALT
{LCTRL}LEFT CTRL
{RCTRL}RIGHT CTRL
{LSHIFT}LEFT SHIFT
{RSHIFT}RIGHT SHIFT
{SLEEP}SLEEP

The Numpad Keys.

{NUMPAD0} - {NUMPAD9}DIGITS
{NUMPADMULT}MULTIPLY
{NUMPADSUB}SUBTRACT
{NUMPADADD}ADD
{NUMPADDIV}DIVIDE
{NUMPADDOT}PERIOD
{NUMPADENTER}ENTER on the numpad

UP and DOWN Keycodes.

{ALTDOWN}Holds ALT down until {ALTUP} is sent.
{SHIFTDOWN}Holds SHIFT down until {SHIFTUP} is sent.
{CTRLDOWN}Holds CTRL down until {CTRLUP} is sent.
{LWINDOWN}Holds LEFT WINDOWS KEY down until {LWINUP} is sent.
{RWINDOWN}Holds RIGHT WINDOWS KEY down until {RWINUP} is sent.