AutoHotkey integration (edit, reload, index .ahk scripts)
The AutoHotkey integration is a bundled plugin that keeps a managed .ahk file of your hotstrings and hotkeys, edits and saves your own scripts in a full Monaco editor, reloads AutoHotkey the moment you save, and can write three AI reference documents that map your script.
On this page
What it is
AutoHotkey is the Windows tool behind text expansion and keyboard shortcuts. Omniscio's integration is a plugin that gives it two halves and one shared folder:
- The Manager — you add entries (hotstrings, hotkeys, snippets) through a form instead of typing AutoHotkey syntax. Omniscio compiles them into one managed
.ahkfile that your own script#Includes. - The Editor — a full Monaco editor (the one VS Code uses) with AutoHotkey syntax highlighting, line folding, bracket colouring and a minimap, for editing your own scripts directly.
The project is folder-backed: it is a real Windows folder you pick once, and Omniscio treats it like a regular project in the sidebar, so agents can read and edit those files with normal tools too. Your own script is never rewritten — the integration backs it up first, then adds the #Include line and a short auto-reload block, each once. The managed file is a separate file it owns.
It is Windows-only, because AutoHotkey is.
Where to find it
Turning it on
The integration ships as a built-in plugin that is switched off. There is no Settings → AutoHotkey page — that surface belonged to an older, in-core version and is gone. You turn the plugin on in Marketplace → Installed, like any other built-in.
An agent can do the whole setup in one call: POST /ahk/setup takes the machine from "the plugin is off" to "AutoHotkey works". It turns the plugin on, installs AutoHotkey with winget if it is missing, picks and remembers where the managed file lives, finds your main script (or creates one if you have none), detects whether that script is AutoHotkey v1 or v2 and matches it, writes the managed file, backs your script up, adds the #Include line and the auto-reload snippet — each at most once, so running it again changes nothing — and starts AutoHotkey on it. It reports every step as done or skipped. If it had to create a script, it asks in your inbox whether that script should start when you log in; the script works either way.
Getting around
- The sidebar row. The AutoHotkey row sits in the Plugins section and is always on screen, even with Show only active projects turned on — a plugin hub is a tool, not a session bucket, so the activity filter never hides it.
- Two tabs. The hub opens on Manager, with Editor beside it.
- The File panel (in the Manager) is where the folder lives: Choose folder, Choose my script, the generated file's name, the exact Include line with a Copy button, and a note that the file is written automatically whenever you change anything. If a write ever fails, the failure stays on screen with a Retry rather than flashing past.
- The project's own rail. Open the integration's project from the sidebar and the top of its sessions rail lists every
.ahkscript in your folder. Clicking one opens that script in the Editor. Below it, a Reference section lists the three generated documents and the Generate Script Index button. - The plugin's settings — AutoHotkey version (v1 or v2), the generated file's name, and the AI text-correction switch and key combinations — live on its card in Settings → Plugins.
How it behaves
The Manager writes the file for you
Adding, editing, deleting, disabling, reordering or importing an entry rewrites the managed .ahk file immediately and tells your running script to reload. There is no "write it now" button, because there is nothing to remember: the file follows the list.
Entries can carry any number of tags, and a tag with a / in it (like work/email/signatures) becomes a nested path shown as a collapsible tree with per-node counts — clicking a node filters to everything at or under it. Multi-select gives bulk Tag… / Untag… over a selection, and each tree node's ⋯ menu offers prefix-aware Rename everywhere and Delete everywhere (renaming work also renames work/email; deleting a tag never deletes your entries). Tags never appear in the generated file.
Alongside that: per-entry enable/disable and reordering, a live preview of the file being generated, one-click starter presets (fff that expands to today's date, @@ for your email, ttt for the time and ddd for date and time), and an import wizard that scans an existing .ahk script and brings its one-line hotstrings over in bulk, with duplicate detection and a batch tag.
A managed hotkey that clashes with one your own script already binds is emitted as a comment instead of a live duplicate, and the preview names the ones it skipped — a duplicate aborts the whole reload, which would break every shortcut you have.
The editor edits your own scripts
The Editor tab opens on a script you choose from its file list, or on the script you clicked in the project's rail. Every click on a row is honoured once, and the newest click wins: click two scripts quickly and you get the second, not a flash of the first.
A row click never throws away unsaved work. Clicking the file you are already editing just keeps it, with its edits. Clicking a different file with unsaved changes asks first — Discard and open or Keep editing — and if you keep editing you stay where you were and are told your changes are still there.
Saving keeps working across restarts. Ctrl+S hands the save to Omniscio itself, which writes the file, rather than to the plugin's sandboxed panel whose folder permission lapses every time the app restarts — so a save keeps working and there is no folder to re-pick. The editor takes keyboard focus when it opens, so you can type straight away.
Saving also asks your script to reload: Omniscio drops a small .amc-ahk-reload.signal file beside the script you saved, and the snippet in your script checks for it about once a second, deletes it and calls Reload. Your script gets that snippet by itself: a moment after Omniscio starts, a script with no reload mechanism of any kind is given the one that matches its AutoHotkey version, with a dated backup left beside it, and never a second time. A script that already reloads — including one set up by the older Agent Mission Control install, which watches C:\tmp\ahk-reload.signal — is left byte-identical, and a save now feeds that older marker too, so those scripts reload on a save without anything being pasted or edited. The editor's collapsible Set up auto-reload (one-time) panel still shows the snippet in both forms for anyone who would rather paste it themselves. There is a Reload on save switch in the editor toolbar if you would rather reload by hand, and Wrap and Minimap toggles for the view.
A very large script is heavy to keep loaded, so if you leave the editor tab for a couple of minutes with nothing unsaved, Omniscio quietly unloads the editor and reloads it the instant you come back. Your unsaved edits always keep it loaded.
AI text correction
Switch it on in the plugin's settings and Omniscio writes two hotkeys into the managed file: a proofread key (default Ctrl+Alt+W) that fixes the spelling and grammar of your selection, and a shorthand key (default Ctrl+Alt+E) that turns a misspelling or abbreviation into the intended word. Press the key to review the fix before it pastes, or hold Shift with it to auto-paste without reviewing. Both combinations are configurable, and one that clashes with a hotkey in your own script is held back and reported rather than emitted.
The shorthand key is the one that changes engine by what you selected. On a single word or abbreviation it uses the shorthand engine; on a selection longer than one word it hands over to the proofreading engine, because the shorthand engine is built to resolve one trigger into the word it stands for and answers prose with a fragment. The proofread key always uses the proofreading engine. On top of that, a reply of only one or two words to a selection of four or more words is treated as a failed answer and your original text is returned instead — so a bad answer can never overwrite what you selected.
Correction runs through Omniscio's managed AI, so no API key lives in your script, and it inherits Omniscio's retries, provider fallback, cost tracking and daily spend cap. If Omniscio is offline or the correction fails, your original text is pasted back unchanged. A settings screen inside the Manager, with a live warning when a combination clashes with your own script, is coming; until it lands, these settings live on the plugin's card in Settings → Plugins.
Quick Launch → Hotstring Creator
Omniscio's Quick Launch has its own Hotstring Creator panel (default shortcut Ctrl+Alt+G). Select a typo or a shorthand in any app and press the shortcut: the panel opens with your selection in Hotstring and an AI suggestion in Expands to. Edit either box if you like, then press Enter from anywhere in the panel — the hotstring is saved, the panel closes, and the expansion is pasted over the text you had selected. Shift+Enter adds a new line instead. Opened with nothing selected, Enter just saves.
Three toggles set the AutoHotkey options — Expand immediately (fire without waiting for a space, on by default), Inside words, and Match case. Saving writes the entry into the plugin's store, rewrites the generated .ahk file and reloads your script, so the new shorthand works right away without opening the Manager. If the trigger already exists it is updated rather than added twice. When something stops the save — the plugin is off, no folder chosen yet, the file locked — the panel stays open, says which, and replaces nothing. Suggest again re-asks the AI; Copy copies the expansion.
The script index
Generate Script Index in the project's Reference section reads your script and writes three markdown documents next to it: a structure index of every function, hotkey and class; a hotkey reference; and a list of key combinations you have not claimed yet. Generation runs through the plugin's own engine, so the panel and the plugin always produce the same documents. Each row becomes clickable as soon as its file exists.
What changed from the old version
The integration used to be built into Omniscio, with its own settings page and its own editor. That is all in the plugin now, and a one-time migration moves an existing Manager's entries into it so the plugin is the single copy. Nothing needs reinstalling — turn the plugin on, and its card in Settings → Plugins holds everything.
Related
- cli-control.md — pair AutoHotkey with CLI Control to bind hotkeys that launch Omniscio sessions
- deep-links.md —
omniscio://URLs are easy to open from an AutoHotkey hotkey
Last verified 2026-11-05