The Auto-Code Feature

Dashboard Architect includes an Auto-Code feature that increase the speed of entering source code. To function correctly, Auto-Code must be enabled in Options. See The Options Dialog Box.

Auto-Code automatically adds closing quotation marks, brackets, and parentheses immediately after the opening character. The cursor waits in between the opening and closing characters for you to type. Entering the closing character overwrites the automatically added character.

Closing braces are added two lines down with a blank line in between the opening and closing braces. The cursor waits on the blank line, indented one tab.

Auto-Code enables a special class of macros that are triggered by the spacebar. See Macros. Table 17 lists and describes these Auto-Code macros that are available in Dashboard Architect. The caret position at the end of the expansion is substituted with I.

Tip:

To prevent Auto-Code macros from being expanded, press Ctrl+Space rather than space after the macro name. For example, if Ctrl+Space.

Table 17. Auto-Code Examples

Auto-Code

Expansion Description

Example

if

Expands to an if statement including braces, with the caret in parentheses

if (I) {
}

else

Expands to an else statement including braces, with the caret on the blank line between the braces

else {
   I
}

while

Expands to a while loop including braces, with the caret in parentheses

while (I) {
}

for

Expands to a for loop including braces, with the caret in parentheses at the loop index initialization position

for (I;;) {
}

function (or fn)

Expands to an empty function with the caret placed before the parentheses for the function, where the function name is placed

function I() {
}

try

Expands to a try and catch block, with the caret on the first line of the try block indented one tab

try {
   I
}
catch(e) {
}

ad

Expands to ActiveDocument with the caret in the next character position

ActiveDocumentI

cn

Expands to a Console.Writeln statement with the caret between the quotation marks of the message to be printed

Console.Writeln(“I”)