Chr()

Auto Hotkey

Chr()

Returns the string (usually a single character) corresponding to the character code indicated by the specified number.

String := Chr(Number)

Parameters

Number

If Unicode is supported, Number is a Unicode character code between 0 and 0x10FFFF; otherwise it is an ANSI character code between 0 and 255.

Return Value

This function returns a string corresponding to Number. If Number is not in the valid range of character codes, an empty string is returned.

Remarks

The meaning of character codes greater than 127 depends on the string encoding in use, which in turn depends on whether a Unicode or ANSI executable is in use.

Common character codes include 9 (tab), 10 (linefeed), 13 (carriage return), 32 (space), 48-57 (the digits 0-9), 65-90 (uppercase A-Z), and 97-122 (lowercase a-z).

Related

Ord

Examples

MsgBox, % Chr(116) ; Shows "t".