Introduction to Basic Functions

Overview

In computer programming, a function is a predefined formula which automatically generates various kinds of output. Its main purpose is to accept certain input from the user and return a value which is passed onto the main program to finish the execution. Functions can reduce code repetition and increase code readability.

Most programming languages such as VBScript come with a built-in range of functions that perform various actions or routines and return a specific value. Automate encompasses a VBA-compatible engine designed to extend the functionality available in AML (Automate Markup Language), the primary internal language that it uses. Not only does this allow multi-line BASIC scripts to be included in a task (with the use of the BASIC Script action), it allows all built-in, pre-defined Visual Basic functions to be used as an expression in text fields of any step of a task as well by simply surrounding the function with percent signs.

Some VBA-compatible functions require other parameters in order to properly complete a procedure or routine. The general format of a function is its name followed by any arguments contained in between parenthesis:

FunctionName (arguments)

For more details in regards to the use of functions, see Using Functions.

Accessing Basic Functions

A full library of pre-defined VBA functions can be found in the lower left pane of the Expression Builder under the BasicFunctions folder (shown below). Help regarding each function can be accessed by first expanding the Functions folder, then selecting the desired function from the lower right pane and pressing the F1 key or by right-clicking the function and selecting Help from the popup menu that appears.

Furthermore, Automate includes a large collection of additional functions that extend the functionality of the Automate Scripting Engine beyond the capabilities of what the basic VBA-compatible engine provides. These functions are collectively referred to as Automate Extended Functions.

See Also:

Using Functions

Introduction to Automate Scripting

Introduction to Extended Functions