Tutorial

Getting Started with Macros

Macro Editor

User Interface

Menus and Toolbar

Editing Macros

Macro Debugging

How To

Using variables

Finding and modifying objects

Creating new page content

Asking for user input

Storing persistent data

Using binary data

Sorting objects

Macro menus

Bulleted and numbered lists

Sample Macros

Concepts

Expressions

Objects

Properties

Variables

Data Types

Arrays

Functions

Literals

Operators

Comments

Last updated on: September 02, 2024
Also available as a single HTML file

Onetastic Macro Documentation > Functions > String Functions > Chr

Chr

Creates a string from a given ASCII number or Unicode code point. For instance Chr(10) will return the newline character "\n".

Syntax

String Chr(Mixed number...)

Parameters

Mixed number (optional)
The ASCII number(s) or Unicode code point(s). This can be a single number/code point, multiple numbers/code points separated by commas, or an array of numbers/code points. If given multiple numbers/code points or an array of them, it will return a string that contains each of the characters. Chr(13, 10) or Chr(Array(13, 10)) will return "\r\n".

Examples

Chr(65) // "A" Chr(79, 110, 101, 78, 111, 116, 101) // "OneNote" Chr(Array(77, 97, 99, 114, 111)) // "Macro" Chr(9924, 9917) // "⛄⚽"

Reference

Statements

Hierarchy Objects

Page Objects

Other Objects

Functions

Array Functions

Color Functions

Data Store Functions

Date/Time Functions

Dialog Box Functions

Macro Execution Functions

Macro Menu Functions

Object Functions

Special Functions

String Functions

Window Functions