Chr

From AutoIt Wiki

Jump to: navigation, search

Returns a character corresponding to an ASCII code. Adapted from AutoIt docs.

Contents

[edit] Syntax

$var = Chr(ASCIIcode)

[edit] Parameters

ASCIIcodeAn ASCII code in the range 0 to 255 (e.g. 65 returns "A").

[edit] Return Value

Success: Returns a string containing the ASCII representation of the given code.
Failure: Returns a blank string and sets @error to 1 if the ASCIIcode is greater than 255.

[edit] Example

$text = ""
For $i = 65 to 90
    $text = $text & Chr($i)
Next
MsgBox(0, "Uppercase alphabet", $text)

[edit] Related Functions

Asc AscW ChrW String

Personal tools