Macro Editor

The Macro Editor is where you write and edit the logic of Main Macros. AdvantageBuilder macros support multiple scripting engines, template language, including AdvantageBuilder’s automation APIs.

Overview

The Macro Editor opens when you select a macro in the Main Macros tab and choose Open/Edit. It provides a full editing environment for writing automation logic using:

The editor supports syntax highlighting, code templates, snippets, and integration with AdvantageBuilder’s automation APIs.

Editor Layout

The Macro Editor layout typically includes:

The editor is designed for both beginners and advanced users, providing point‑and‑click insertion of common constructs while allowing full scripting flexibility.

Scripting Engines

AdvantageBuilder supports multiple scripting engines inside the Macro Editor. Each engine has its own capabilities and helper functions.

JScript

The classic Windows JScript engine. Supports AdvantageBuilder’s JavaScript helper APIs.

JavaScriptV8 (ClearScript)

A modern JavaScript engine with high performance and full access to AdvantageBuilder’s V8 helper APIs.

PowerShell Script

Full PowerShell scripting with access to AdvantageBuilder’s PowerShell helper APIs.

PowerShell Script (STA)

Single‑threaded PowerShell mode for UI‑related automation.

Template Language

A powerful templating system that mixes script blocks with text generation. See Template Language Reference.

Code Features

The Macro Editor supports:

Running Macros from the Editor

The Macro Editor includes a Run button that executes the macro immediately. This is useful for testing logic without returning to the Main Macros tab.

Execution from the editor uses the same engine and environment as execution from the Main Macros tab.

Saving Macros

Macros are saved directly into the folder structure shown in the Main Macros tab. Saving updates the macro file and makes it available for execution, scheduling, and GUI integration.