Documentation

Getting started

Everything you need to open MacroFoundry, run your first routine and find your way around.

What MacroFoundry does#

MacroFoundry automates things you would otherwise do by hand on your PC: pressing keys, clicking, typing, waiting for something to appear, reacting to what is on screen, starting or closing programs, copying, moving or deleting files, and reading spreadsheets saved as CSV.

You build routines. A routine is a list of commands that run from top to bottom, one line at a time, like a recipe.

Routines can run on their own, alongside each other, from a hotkey, at a set time, or automatically when a monitor notices something (a colour on screen, or a value in a program's memory).

Everything you make is saved together in a project file (.mforge).

The main window#

  • Toolbar (top): Start, Pause, Resume and Stop act on the selected routine. Stop all stops every routine and turns off every monitor. Save saves the project. The button on the right switches between the dark and light theme.
  • Routines (left): every routine in the project. Click one to see its commands. Double-click one to start it.
  • Commands (middle): the commands of the selected routine, numbered by line.
  • Command settings (right): the settings of the selected command. Changes apply straight away.
  • While a routine runs, the line it is on is highlighted in yellow.
  • Bottom tabs: Global Variables, Pixel Monitors, Memory Monitors and Execution Log.
  • Status bar (very bottom): which routines are running, how many monitors are on, and a reminder that F9 or the Pause key stops everything.
A routine open in the main window. The line it is on is highlighted while it runs.
A routine open in the main window. The line it is on is highlighted while it runs.

Your first routine#

  1. In the Routines box, click New and give the routine a name.
  2. Click + Add command and pick Timing > Delay. Set Time to 1000 (one second).
  3. Click + Add command again and pick Other > Log Message. Type a message such as Hello.
  4. Press F5 (or click Start). After one second, your message appears on the Execution Log tab.
  5. Press Ctrl+S to save the project.
Tip: New commands are inserted below the selected line, so select the line you want to add after first.

Starting and stopping routines#

  • Start: select a routine and press F5, click Start, or double-click it in the Routines box.
  • Pause / Resume: pauses or continues the selected routine.
  • Stop: stops the selected routine.
  • Stop all: stops every routine and turns off every monitor.
  • From anywhere, even while a game has focus: F9 (unless you changed it in Hotkeys) or the Pause key stops everything. The Pause key always works and cannot be given to anything else.

A routine that is already running is not started a second time.

Keys and mouse buttons a routine was holding down are released automatically when it ends.

Projects: new, open, save#

  • File > New project (Ctrl+N) starts an empty project.
  • File > Open (Ctrl+O) opens a .mforge file.
  • File > Save (Ctrl+S) and Save as save the project. An asterisk (*) in the title bar means there are unsaved changes.
  • File > Load the demo project loads a small, safe example project.

MacroFoundry asks whether to save before it throws away unsaved changes.

Auto save: when the Auto save button on the toolbar (next to the theme button) says On, as it does to begin with, MacroFoundry saves the project every 5 minutes if it has unsaved changes. A new project is only auto saved after you have saved it once with Save as, so it has a file name. Each auto save is noted in the Execution Log.

When MacroFoundry starts, it reopens the project you last used. If there is none, it loads the demo project.

A project holds your routines, variables (with their starting values), pixel monitors, memory monitors, breakpoints, schedules, and the hotkeys of routines and monitors.

Only one MacroFoundry at a time#

If MacroFoundry is already running and you open it again, the copy that is already running comes to the front (even from the tray) instead of a second copy starting.

The Help menu#

  • User Manual (F1): this manual. Type in the search box to find a topic.
  • Plugins: shows which plugins are loaded and can open the Plugins folder.
  • Start the MemoryTarget test program: a small safe program for practising memory monitors, clicks and typing.
  • About: version information.