#EscapeChar (and explanation of escape sequences)

Changes the script's escape character (e.g. accent vs. backslash).

#EscapeChar NewChar

Parameters

NewChar

Specify a single character.

Remarks

The escape character is used to indicate that the character immediately following it should be interpreted differently than it normally would.

The default escape character is accent/backtick (`).

Escape Sequences (when accent is the escape character)

Type This To Get This
`,

, (literal comma).

Note: Commas that appear within the last parameter of a command do not need to be escaped because the program knows to treat them literally. The same is true for all parameters of MsgBox because it has smart comma handling.

`% % (literal percent)
`` ` (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.

`:: :: (literal pair of colons). [v1.0.40+]: It is no longer necessary to escape these.
`n newline (linefeed/LF)
`r carriage return (CR)
`b backspace
`t tab (the more typical horizontal variety)
`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 {^}{!}{{}.
"" Within an expression, two consecutive quotes enclosed inside a literal string resolve to a single literal quote. For example: Var := "The color ""red"" was found.".

Related

The following rarely used directives also exist; their usage is shown in these examples:

#singleinstance force

class Person {
	__new(name, email, occupation){
		this.name := name
		this.email := email
		this.occupation := occupation
	}
}

class Teacher {
	__new(subject){
		this.subject := subject  
	}
}

class Student {
	__new(classes, grades){
		base.__New(name, email)
		this.classes := classes
		this.grades := grades  
	}
}

robert := new Student("Robert Mugabe", "robbiemugabe@zimbabwe.com", "dfd",  new Teacher("English"))
msgBox % robert.grades

Example

Changes the script's escape character (e.g. accent vs. backslash).