Escape Sequences

Auto Hotkey

Escape Sequences

The escape character ` (back-tick or grave accent) is used to indicate that the character immediately following it should be interpreted differently than it normally would.

Type This To Get This
`` ` (literal accent; i.e. two consecutive escape characters result in a single literal character)
`;  ; (literal semicolon). Note: This is necessary only if a semicolon has a space or tab to its left. If it does not, it will be recognized correctly without being escaped.
`n newline (linefeed/LF)
`r carriage return (CR)
`b backspace
`t tab (the more typical horizontal variety)
`s space
`v vertical tab -- corresponds to Ascii value 11. It can also be manifest in some applications by typing Control+K.
`a alert (bell) -- corresponds to Ascii value 7. It can also be manifest in some applications by typing Control+G.
`f formfeed -- corresponds to Ascii value 12. It can also be manifest in some applications by typing Control+L.
Send When the Send command or Hotstrings are used in their default (non-raw) mode, characters such as {}^!+# have special meaning. Therefore, to use them literally in these cases, enclose them in braces. For example: Send {^}{!}{{}.
`" or `' Single-quote marks (') and double-quote marks (") function identically, except that a string enclosed in single-quote marks can contain literal double-quote marks and vice versa. Therefore, to include an actual quote mark inside a literal string, escape the quote mark or enclose the string in the opposite type of quote mark. For example: Var := "The color `"red`" was found." or Var := 'The color "red" was found.'.

Example

MsgBox "Line 1`nLine 2"