Macros

AdvantageBuilder uses two macro systems: Main Macros for automation logic, and Macro GUI for HTML‑based user interfaces. This page explains how they differ, how they work together, and how macros are organised, executed, and scheduled.

Main Macros

Main Macros contain the automation logic of AdvantageBuilder. They run scripts, call other macros, interact with databases, generate files, launch GUI pages, and perform workflow automation.

Where Main Macros Live

Main Macros appear in the Macros ‑ Main tab page inside the application. This screen includes:

The Open/Edit menu item launches the Macro Editor, which is a separate screen.

Execution Modes

Scheduling

Main Macros support built‑in scheduling. You can schedule macros to run:

Scheduling is managed through the Scheduled tab in the Main Macros screen.

Organisation

Macros can be organised into folders and subfolders. Folder operations include:

These operations belong to the Main Macros tab page, not the Macro Editor.

Macro GUI

Macro GUI contains HTML‑based user interface macros. These are mini web pages that run inside AdvantageBuilder and allow you to build forms, dashboards, wizards, and interactive tools.

Where Macro GUI Lives

Macro GUI files appear under the MacroGUI folder in the Macros ‑ GUI tab. They are edited using the HTML GUI Editor, which is a default text editor for HTML, CSS, JavaScript, or other text files.

Launching Macro GUI Pages

Macro GUI pages are displayed using the following functions:

These functions show the GUI page to the user.

Loading HTML Documents (Not Displayed)

The following functions load HTML documents for parsing or processing, but do not display them:

These return an HTMLDocument or HtmlAgilityPack document.

Passing Parameters to Macro GUI

AdvantageBuilder supports three mechanisms for passing parameters from Main Macros to GUI pages:

  1. Query Strings – appended to the URL and accessed via QueryString["name"]
  2. GUI Parameters – stored using the GUI Parameters Object Model and accessed via macroGUIParams["name"]
  3. Macro Arguments – passed directly to launchHTMLForm(url, params) and accessed via args.name

These mechanisms can be used independently or together.