Macro GUI

Macro GUI is AdvantageBuilder’s HTML‑based user interface system. Macro GUI pages are mini web applications built using HTML, CSS, and JavaScript, and launched directly from Main Macros. They allow you to create forms, dashboards, wizards, data entry screens, and interactive tools.

What Macro GUI Is

Macro GUI consists of HTML files stored under the MacroGUI folder in the Macros ‑ GUI tab. These files are edited using the HTML GUI Editor, which is a default text editor for HTML, CSS, JavaScript, or any other text file.

Macro GUI pages run inside AdvantageBuilder’s embedded browser engine (legacy or Edge mode depending on which launch function is used).

Launching Macro GUI Pages

Macro GUI pages are displayed using one of the following functions:

These functions show the GUI page to the user.

Choosing the Browser Engine

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, allowing you to:

They are strictly for document access, not UI display.

Passing Parameters to Macro GUI

AdvantageBuilder supports three mechanisms for passing parameters from Main Macros to GUI pages. These mechanisms can be used independently or together.

1. Query Strings

Append ?key=value pairs to the URL. Access them in the GUI using:

QueryString["Planet"]

2. GUI Parameters

Use the GUI Parameters Object Model to store values:


var p = eval(getSourceCode('GUIParameters', 'Macro Main Helpers\\Library', 'GUIParameters'));
p.Add('City', 'New York');
p.Save();
    

Access them in the GUI using:

macroGUIParams["City"]

3. Macro Arguments

Pass a JavaScript object directly to the launch function:


var args = { StreetName: "George", StreetNumber: "45" };
launchHTMLForm(url, args);
    

Access them in the GUI using:

args.StreetName

Macro GUI Helpers

Macro GUI Helpers are tools that generate HTML files for you. They appear under the Macro GUI Helpers folder in the Macros - Main tab.

Examples include:

These helpers create starter HTML/CSS/JS files that you can then edit in the HTML GUI Editor. They do not load or display HTML documents, and they are not related to loadHTMLDocument or loadHTMLDocumentEdge.

HTML GUI Editor

The HTML GUI Editor is a default text editor for Macro GUI files. It allows you to edit:

The HTML Editor is the primary tool for creating and editing Macro GUI HTML files. It provides several productivity features through its toolbar, making it especially effective when building HTML based user interfaces.

HTML Auto Code

A typing minimisation feature that provides a hierarchical pop-up menu containing commonly used HTML elements. Simply point and click to insert the selected element's source code directly into your document.

JScript Snippet Library

Contains a collection of reusable JScript code snippets. These snippets can be inserted into your HTML or JavaScript files to speed up development and reduce repetitive coding.

Editor Snippet Library

Provides a collection of ready-to-use code snippets, including complete HTML document templates and core techniques. Some of the more important templates and techniques include: