All integrations
Built inYour computer

AutoHotkey

Included with Macro Deck

Keep your AutoHotkey v2 scripts in Macro Deck, run and stop them from a button and let them read and set variables.

  • Write, check and test AutoHotkey v2 scripts in Macro Deck
  • Run scripts, .ahk files or inline code from a button
  • Start, stop and toggle scripts that keep running
  • Pass values safely as parameters
  • Scripts can read and set variables and show notifications

The AutoHotkey integration runs AutoHotkey v2 scripts from your buttons and automations: sending keys to a window in the background, arranging windows, app-specific hotkeys and anything else AutoHotkey can do. It is available on Windows only and is off until you turn it on. Macro Deck does not include AutoHotkey; it finds the AutoHotkey v2 you installed, or a portable one you choose. AutoHotkey v1 is not supported.

What you can do

  • Keep your scripts on the integration's Scripts tab, edit them with syntax highlighting, Check syntax and run them right there. Last run shows how the latest run went, its result, errors with their line, and the script's output.
  • Run a script from the library with Run AutoHotkey script, an .ahk file where it is stored with Run AutoHotkey file, or code written in the action itself with Run inline AutoHotkey code.
  • Start scripts with hotkeys or timers together with Macro Deck, and start and stop them with Toggle AutoHotkey script. The button shows Running or Not running.
  • Pass values to a script as Parameters. Macro Deck never inserts values into the text of a script, so a value cannot break or change your code. The script reads them as MacroDeck.Params["name"].
  • Let a script talk back through the Macro Deck helper: MacroDeck.GetVar and MacroDeck.SetVar read and set variables, MacroDeck.Notify shows a notification and MacroDeck.SetResult reports a result to the action.
  • Start an automation when a script starts, exits or fails.

Some example setups:

  • A Toggle AutoHotkey script button for a script with your gaming hotkeys, with its own look for Running and Not running.
  • A button that runs a script with the parameter volume set to {{ vars.volume }}, and the script calls SoundSetVolume MacroDeck.Params["volume"].
  • An automation on AutoHotkey script failed that shows {{ event.reason }} on a button.

How scripts run

AutoHotkey never shows its error dialogs for scripts Macro Deck runs: load errors and runtime errors appear under Last run and make an action that waits fail. A script that is stopped is asked to close first, so its OnExit routine runs, and is ended after the Stop grace period in seconds. Stop and Toggle only touch scripts Macro Deck started. When Macro Deck exits or you turn the integration off, it stops all the AutoHotkey scripts it started.

When you migrate from Macro Deck 2, buttons of the AutoHotkey plugin by jbcarreon123 that run AutoHotkey v2 scripts move over to these actions.

System

Included with Macro Deck

Control your computer from your deck: apps, volume, commands, notifications, sleep and shutdown.

Keyboard

Included with Macro Deck

Press shortcuts, type text and run key sequences on your computer from a button.

Mouse

Included with Macro Deck

Click, move the pointer, drag and scroll on your computer from a button.

ADB / Android Debug Bridge

Included with Macro Deck

Control an Android phone or tablet over USB or Wi-Fi: wake it, start apps, tap, type and take screenshots.

Steam

Included with Macro Deck

Start and close Steam games, and show what you play, your friends and your library on your deck.