Send Command Syntax
The "Send" command syntax is similar to that of ScriptIt and the
Visual Basic "SendKeys" command. Characters are sent as written with
the exception of the following characters:
'!'
This tells AutoIt to send an ALT keystroke, therefore "Send,This is text!a"
would send the keys "This is text" and then press "ALT+a".
N.B. Some programs are very choosy about capital letters and ALT keys, i.e.
"!A" is different to "!a". The first says ALT+SHIFT+A, the
second is ALT+a. If in doubt, use lowercase!
'+'
This tells AutoIt to send a SHIFT keystroke, therefore "Send,Hell+o"
would send the text "HellO". "Send,!+a" would send "ALT+SHIFT+a".
'^'
This tells AutoIt to send a CONTROL keystroke, therefore
"Send,^!a" would send "CTRL+ALT+a".
N.B. Some programs are very choosy about capital letters and CTRL keys, i.e.
"^A" is different to "^a". The first says CTRL+SHIFT+A, the
second is CTRL+a. If in doubt, use lowercase!
'#'
The hash is used as a key delimiter to make a line easier to read. i.e.
"Send, H#e#l#l#o" is the same as "Send,Hello".
Certain special keys can be sent and should be enclosed in braces:
N.B. Windows does not allow the simulation of the
"CTRL-ALT-DEL" combination!
Send Command |
Resulting Keypress |
{!} | ! |
{#} | # |
{+} | + |
{^} | ^ |
{{} | { |
{}} | } |
{SPACE} | SPACE |
{ENTER} | ENTER |
{ALT} | ALT |
{BACKSPACE} or {BS} | BACKSPACE |
{DELETE} or {DEL} | DELETE |
{UP} | Cursor up |
{DOWN} | Cursor down |
{LEFT} | Cursor left |
{RIGHT} | Cursor right |
{HOME} | HOME |
{END} | END |
{ESCAPE} or {ESC} | ESCAPE |
{INSERT} or {INS} | INS |
{PGUP} | PGUP |
{PGDN} | PGDN |
{F1} - {F12} | Function keys |
{TAB} | TAB |
{PRINTSCREEN} | PRINTSCR |
{LWIN} | Left Windows key |
{RWIN} | Right Windows key |
{NUMLOCK} | NUMLOCK |
{CTRLBREAK} | Ctrl+break |
{PAUSE} | PAUSE |
{CAPSLOCK} | CAPSLOCK |
{NUMPAD0} - {NUMPAD 9} | Numpad digits |
{NUMPADMULT} | Numpad Multiply |
{NUMPADADD} | Numpad Add |
{NUMPADSUB} | Numpad Subtract |
{NUMPADDIV} | Numpad Divide |
{NUMPADDOT} | Numpad period |
{APPSKEY} | Windows App key |
{ALTDOWN} | Holds the ALT key down until {ALTUP} is sent |
{SHIFTDOWN} | Holds the SHIFT key down until {SHIFTUP} is sent |
{CTRLDOWN} | Holds the CTRL key down until {CTRLUP} is sent |
{LWINDOWN} | Holds the left Windows key down until {LWINUP} is sent |
{RWINDOWN} | Holds the right Windows key down until {RWINUP} is sent |
{ASC nnnn} | Send the ALT+nnnn key combination |
To send the ASCII value A (same as pressing ALT+65 on the numeric keypad)
Send, {ASC 65}
Single keys can also be repeated, e.g.
Send, {DEL 4} Presses the DEL key 4
times
Send, {S 30} Sends 30 'S'
characters
Send, +{TAB 4} Presses SHIFT+TAB 4 times