# ashketchum2017/macrorunner architecture

> Architecture diagram of the GitHub repository ashketchum2017/macrorunner, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ashketchum2017/macrorunner
- Repository: https://github.com/ashketchum2017/macrorunner

## Overview

MacroRunner is a CorelDRAW VBA tool for configuring ordered GMS macro sequences, preflighting them, running them step by step, and reporting status and duration. The graph follows the README’s documented workflow and module names; source excerpts were unavailable, so internal call ownership is shown only where the documentation explicitly describes it.

Main entry points: [`src/forms/MacroRunnerMenu.vba`](https://github.com/ashketchum2017/macrorunner/blob/main/src/forms/MacroRunnerMenu.vba) (Runner Menu), [`src/forms/MacroQueue.vba`](https://github.com/ashketchum2017/macrorunner/blob/main/src/forms/MacroQueue.vba) (Macro Queue), [`src/classes/MRSequenceStore.cls`](https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRSequenceStore.cls) (Sequence Store), [`src/forms/MacroSelection.vba`](https://github.com/ashketchum2017/macrorunner/blob/main/src/forms/MacroSelection.vba) (Macro Selection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Configuration UI"]
  node_menu["Runner Menu"]
  node_queue["Macro Queue<br/>[MacroQueue.vba]"]
  node_selection["Macro Selection<br/>[MacroSelection.vba]"]
end

subgraph group_runtime["Run and Behavior"]
  node_presenter["Presenter<br/>[MRPresenter.cls]"]
  node_runmodel["Run Model<br/>[MRRunModel.cls]"]
  node_catalog["Macro Catalog<br/>[MRCatalog.cls]"]
  node_sequenceparser["Sequence Parser"]
  node_behaviorparser["Behavior Parser"]
  node_behaviorblock["Behavior Blocks"]
  node_behaviorinstruction["Behavior Instructions"]
  node_stopwatch["Stopwatch<br/>[MRStopwatch.cls]"]
  node_clipboard["Clipboard<br/>[MRClipboard.cls]"]
end

subgraph group_storage["Configuration Storage"]
  node_sequence_store["Sequence Store"]
  node_config_json["JSON Configuration<br/>[MRConfigJson.cls]"]
  node_configuration["Configuration"]
  node_queue_row["Queue Row<br/>[MRQueueRow.cls]"]
  node_config_file[("Configurations JSON")]
  node_legacy_registry[("Legacy Registry")]
end

subgraph group_integration["GMS Integration"]
  node_gms["Target GMS Project"]
  node_bridge["Target Bridge<br/>[MRTargetBridge.bas]"]
  node_lifecycle["Lifecycle Snippet"]
end

node_user(("User"))
node_coreldraw(("CorelDRAW"))

node_user -->|"opens"| node_menu
node_menu -->|"opens queue"| node_queue
node_queue -->|"opens editor"| node_selection
node_user -->|"configures and selects"| node_queue
node_user -->|"starts and continues"| node_menu
node_menu -->|"runs workflow"| node_presenter
node_menu -->|"copies statistics"| node_clipboard
node_menu -->|"measures steps"| node_stopwatch
node_menu -->|"checks projects"| node_catalog
node_menu -->|"requests validation and execution"| node_bridge
node_bridge -->|"dispatches behavior"| node_gms
node_gms -->|"confirms execution"| node_bridge
node_gms -.->|"uses lifecycle hook"| node_lifecycle
node_coreldraw -->|"hosts projects"| node_gms
node_selection -->|"validates sequence"| node_sequenceparser
node_selection -->|"validates behavior"| node_behaviorparser
node_behaviorparser -->|"parses blocks"| node_behaviorblock
node_behaviorparser -->|"parses instructions"| node_behaviorinstruction
node_sequence_store -->|"uses JSON format"| node_config_json
node_config_json -->|"reads and writes"| node_config_file
node_sequence_store -->|"loads legacy data"| node_legacy_registry
node_queue -->|"displays configurations"| node_queue_row
node_sequence_store -->|"loads and saves"| node_configuration

click node_menu "https://github.com/ashketchum2017/macrorunner/blob/main/src/forms/MacroRunnerMenu.vba"
click node_queue "https://github.com/ashketchum2017/macrorunner/blob/main/src/forms/MacroQueue.vba"
click node_selection "https://github.com/ashketchum2017/macrorunner/blob/main/src/forms/MacroSelection.vba"
click node_presenter "https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRPresenter.cls"
click node_runmodel "https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRRunModel.cls"
click node_catalog "https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRCatalog.cls"
click node_sequenceparser "https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRSequenceParser.cls"
click node_behaviorparser "https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRBehaviorParser.cls"
click node_behaviorblock "https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRBehaviorBlock.cls"
click node_behaviorinstruction "https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRBehaviorInstruction.cls"
click node_stopwatch "https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRStopwatch.cls"
click node_clipboard "https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRClipboard.cls"
click node_sequence_store "https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRSequenceStore.cls"
click node_config_json "https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRConfigJson.cls"
click node_configuration "https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRConfiguration.cls"
click node_queue_row "https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRQueueRow.cls"
click node_bridge "https://github.com/ashketchum2017/macrorunner/blob/main/src/Integration/MRTargetBridge.bas"
click node_lifecycle "https://github.com/ashketchum2017/macrorunner/blob/main/src/Integration/FormLifecycleSnippet.vba"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_menu,node_queue,node_selection,node_user toneBlue
class node_presenter,node_runmodel,node_catalog,node_sequenceparser,node_behaviorparser,node_behaviorblock,node_behaviorinstruction,node_stopwatch,node_clipboard toneAmber
class node_sequence_store,node_config_json,node_configuration,node_queue_row,node_config_file,node_legacy_registry toneMint
class node_gms,node_bridge,node_lifecycle toneRose
class node_coreldraw toneIndigo
```

## Components

### Configuration UI

- [Runner Menu](https://github.com/ashketchum2017/macrorunner/blob/main/src/forms/MacroRunnerMenu.vba): `src/forms/MacroRunnerMenu.vba`
- [Macro Queue](https://github.com/ashketchum2017/macrorunner/blob/main/src/forms/MacroQueue.vba): `src/forms/MacroQueue.vba`
- [Macro Selection](https://github.com/ashketchum2017/macrorunner/blob/main/src/forms/MacroSelection.vba): `src/forms/MacroSelection.vba`

### Run and Behavior

- [Presenter](https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRPresenter.cls): `src/classes/MRPresenter.cls`
- [Run Model](https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRRunModel.cls): `src/classes/MRRunModel.cls`
- [Macro Catalog](https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRCatalog.cls): `src/classes/MRCatalog.cls`
- [Sequence Parser](https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRSequenceParser.cls): `src/classes/MRSequenceParser.cls`
- [Behavior Parser](https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRBehaviorParser.cls): `src/classes/MRBehaviorParser.cls`
- [Behavior Blocks](https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRBehaviorBlock.cls): `src/classes/MRBehaviorBlock.cls`
- [Behavior Instructions](https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRBehaviorInstruction.cls): `src/classes/MRBehaviorInstruction.cls`
- [Stopwatch](https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRStopwatch.cls): `src/classes/MRStopwatch.cls`
- [Clipboard](https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRClipboard.cls): `src/classes/MRClipboard.cls`

### Configuration Storage

- [Sequence Store](https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRSequenceStore.cls): `src/classes/MRSequenceStore.cls`
- [JSON Configuration](https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRConfigJson.cls): `src/classes/MRConfigJson.cls`
- [Configuration](https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRConfiguration.cls): `src/classes/MRConfiguration.cls`
- [Queue Row](https://github.com/ashketchum2017/macrorunner/blob/main/src/classes/MRQueueRow.cls): `src/classes/MRQueueRow.cls`
- **Configurations JSON**
- **Legacy Registry**

### GMS Integration

- **Target GMS Project**
- [Target Bridge](https://github.com/ashketchum2017/macrorunner/blob/main/src/Integration/MRTargetBridge.bas): `src/Integration/MRTargetBridge.bas`
- [Lifecycle Snippet](https://github.com/ashketchum2017/macrorunner/blob/main/src/Integration/FormLifecycleSnippet.vba): `src/Integration/FormLifecycleSnippet.vba`

### Other components

- **User**
- **CorelDRAW**

## Connections

- User → Runner Menu: opens
- Runner Menu → Macro Queue: opens queue
- Macro Queue → Macro Selection: opens editor
- User → Macro Queue: configures and selects
- User → Runner Menu: starts and continues
- Runner Menu → Presenter: runs workflow
- Runner Menu → Clipboard: copies statistics
- Runner Menu → Stopwatch: measures steps
- Runner Menu → Macro Catalog: checks projects
- Runner Menu → Target Bridge: requests validation and execution
- Target Bridge → Target GMS Project: dispatches behavior
- Target GMS Project → Target Bridge: confirms execution
- Target GMS Project → Lifecycle Snippet: uses lifecycle hook
- CorelDRAW → Target GMS Project: hosts projects
- Macro Selection → Sequence Parser: validates sequence
- Macro Selection → Behavior Parser: validates behavior
- Behavior Parser → Behavior Blocks: parses blocks
- Behavior Parser → Behavior Instructions: parses instructions
- Sequence Store → JSON Configuration: uses JSON format
- JSON Configuration → Configurations JSON: reads and writes
- Sequence Store → Legacy Registry: loads legacy data
- Macro Queue → Queue Row: displays configurations
- Sequence Store → Configuration: loads and saves
