# AutoHotkey Problems & Issues 2026 - v2 Errors, Hotkeys, Antivirus

Source: https://www.tryorbye.com/products/autohotkey
Last analyzed: 2026-11-15
Try or Bye score: 66/100

## Verdict: Try with caution

AutoHotkey works for some teams, but users report recurring problems (score 66/100). Most reported issues: AutoHotkey v1 scripts not working after installing v2; AutoHotkey hotkeys not working in admin windows; Antivirus flags AutoHotkey or compiled .exe as a virus. Not a good fit for: Non-technical users wanting point-and-click macros; Competitive online gamers; Mac or Linux users. Users most often switch to Microsoft PowerToys, Alfred, Raycast.

## What it is

AutoHotkey (AHK) is a free, open-source scripting language for Windows that lets you remap keys, create hotkeys, expand text with hotstrings, automate clicks and window actions, and build small GUIs. It is aimed at power users, sysadmins and gamers who want custom shortcuts without a heavyweight tool. The current line is v2 (released December 2022); the older v1.1 syntax is incompatible and still widely used.

## Common errors & fixes

### AutoHotkey Anti-Cheat Errors and Bans in Games

Many anti-cheat systems block or flag AHK. Close it before launching the game, and avoid scripts that give gameplay advantage.

1. **Close AutoHotkey before launching** — Right-click the AHK tray icon and choose Exit Check Task Manager for leftover AutoHotkey processes Start the game
2. **Read the game's policy** — Check the publisher's rules on macros and third-party tools Remove scripts that automate gameplay
3. **Use a launch wrapper only for non-game tasks** — Start AHK after the game only for out-of-game utilities Do not hide AHK from anti-cheat; that can itself break the rules

Full guide: https://www.tryorbye.com/products/autohotkey/issues/anti-cheat-ban-games

### AutoHotkey Flagged as Virus by Antivirus

AHK and compiled scripts are often false positives. Verify on VirusTotal, report to the vendor and add an exclusion for your own file.

1. **Verify the file** — Download AutoHotkey only from autohotkey.com Upload the file to VirusTotal or Jotti and read the engines that flag it
2. **Report the false positive** — Submit the file to Microsoft or your antivirus vendor as a false positive Wait for updated definitions (reportedly often within a day for Microsoft)
3. **Exclude your own file** — Open Windows Security > Virus & threat protection > Manage settings Under Exclusions add the specific file or folder Do not disable Defender entirely
4. **Avoid triggers when compiling** — Do not compress the exe with UPX or MPRESS Try the 64-bit base binary on 64-bit PCs Share the .ahk source instead if recipients can install AHK

Full guide: https://www.tryorbye.com/products/autohotkey/issues/antivirus-false-positive

### AutoHotkey Hotkeys Not Working on Non-English Keyboard Layouts

Letter hotkeys depend on the active layout. Bind by scan code (for example sc010) so the hotkey works on any layout.

1. **Use scan codes** — Open the script's tray menu > Open > View > Key history Press the key and note its SC value Use `sc010::` style hotkeys
2. **Restart under the right layout** — Switch to the layout you use Reload the script

Full guide: https://www.tryorbye.com/products/autohotkey/issues/hotkeys-non-english-layout

### AutoHotkey Hotkeys Not Working in Admin Windows

Windows UAC blocks normal scripts from elevated windows. Run the script with UI Access (best) or as administrator.

1. **Run the script with UI Access** — Install AutoHotkey under C:\Program Files (use the installer, not a portable copy) Right-click the script and choose Run with UI access Or use `Run '*UIAccess "Your script.ahk"'`
2. **Run the script as administrator** — Right-click the .ahk file and choose Run as administrator Note that programs the script launches also run elevated Use Task Scheduler with highest privileges to avoid UAC prompts at startup
3. **Check for conflicting tools** — Close launchers or key tools that may grab keys Retest with only your script running

Full guide: https://www.tryorbye.com/products/autohotkey/issues/hotkeys-not-working-admin-windows

### AutoHotkey Modifier Key Stuck (Ctrl, Alt, Shift, Win)

Send can re-press a modifier you already released. Use SendEvent, add small delays and tap the modifiers to clear it.

1. **Unstick it now** — Press and release each modifier key (Ctrl, Alt, Shift, Win) once Reload the script
2. **Change the Send mode** — Try `SendEvent` instead of the default Add a short `Sleep` before the Send
3. **Use key-up hotkeys or explicit releases** — Wait for release with `KeyWait "Ctrl"` before sending Send explicit `{Shift up}` after a down event

Full guide: https://www.tryorbye.com/products/autohotkey/issues/modifier-key-stuck

### AutoHotkey Error: This Line Does Not Contain a Recognized Action

This error almost always means v1-style code is running under v2. Fix the syntax or run the script with the matching version.

1. **Match script and interpreter** — Add `#Requires AutoHotkey v2.0` (or v1.1) as the first line If it reports a version mismatch, run the file with the right AutoHotkey exe
2. **Fix v1-style lines** — Remove the comma after commands: `SetTitleMatchMode 3` Quote text arguments: `MsgBox "Hello"` Use `:=` for assignment
3. **Check shortcuts and tasks** — Open your Task Scheduler or shortcut Make sure it calls the v2 exe for v2 scripts

Full guide: https://www.tryorbye.com/products/autohotkey/issues/no-recognized-action-error

### How to Run an AutoHotkey Script at Startup

Put a shortcut to the script in your Startup folder (shell:startup). Use Task Scheduler if it must run elevated.

1. **Add a Startup shortcut** — Right-click the script and create a shortcut Press Win+R, enter shell:startup, press Enter Paste the shortcut into the folder
2. **All users** — Use shell:common startup instead (needs admin rights)
3. **Run elevated at login** — Open Task Scheduler and create a task triggered At log on Tick Run with highest privileges Action: start AutoHotkey with the script path

Full guide: https://www.tryorbye.com/products/autohotkey/issues/run-at-startup

### AutoHotkey Script Slow or Laggy Under High CPU

Hotkeys can lag when the PC is busy. Raise the script's process priority and trim slow loops.

1. **Raise priority** — Add `ProcessSetPriority "High"` near the top of the script Reload the script
2. **Reduce work in hotkeys** — Keep hotkey bodies short Use SetTimer for long tasks Lower Sleep values where safe

Full guide: https://www.tryorbye.com/products/autohotkey/issues/script-slow-laggy

### AutoHotkey Send and Click Not Working in Games

Games often ignore normal simulated input. Try longer key delays, down/up events or ControlSend; some anti-cheat games block it entirely.

1. **Add key delay** — Use `SetKeyDelay 0, 50` (press duration 50 ms) Raise the duration until the game registers the key
2. **Try other send methods** — Try `SendMode "Play"` (deprecated, may do nothing on Windows 11) Try `ControlSend "abc",, "GameTitle"` Send separate down and up events with a short Sleep between
3. **Run elevated** — If the game runs as admin, run the script with UI Access or as administrator

Full guide: https://www.tryorbye.com/products/autohotkey/issues/send-not-working-games

### AutoHotkey v1 Script Not Working in v2

v2 is not backward compatible, so v1 scripts fail or do nothing. Install v1 for old scripts, or port the syntax and add #Requires so the right version runs.

1. **Run it with v1 instead** — Install AutoHotkey v1.1 alongside v2 (they coexist) Add `#Requires AutoHotkey v1.1` at the top of the old script Launch it again and let the launcher choose v1
2. **Port the script to v2** — Change `x = 5` to `x := 5` Change `Sleep, 1000` to `Sleep 1000` Replace `MsgBox, Hello %name%` with `MsgBox "Hello " name` Wrap hotkey bodies in `{ }` instead of ending with return Replace ErrorLevel checks with try/catch
3. **Try the community converter** — Run the community v1-to-v2 converter on a small script first Fix leftover errors by hand, since it has known gaps Add `#Requires AutoHotkey v2.0` to the converted file

Full guide: https://www.tryorbye.com/products/autohotkey/issues/v1-script-not-working-v2

## Common problems

- **AutoHotkey v1 scripts not working after installing v2** (usability): v2 deliberately dropped backward compatibility: `=` assignments, `%var%` expansion, comma-style commands and `return`-terminated hotkeys all fail. Users who install v2 and double-click an old script get load errors or a script that silently does nothing. Official docs say v1 scripts generally will not work on v2 without changes.
- **AutoHotkey hotkeys not working in admin windows** (integrations): Windows UAC/UIPI stops a normal-privilege script from sending keys to, or catching hotkeys in, elevated windows such as Task Manager, installers or apps run as administrator. The script looks alive but hotkeys do nothing in that window. Official FAQ fixes are running as admin or UI Access from Program Files.
- **Antivirus flags AutoHotkey or compiled .exe as a virus** (security): Windows Defender, Webroot and other engines repeatedly flag Ahk2Exe, the base binaries and compiled scripts as trojans. The official FAQ calls most of these false positives and recommends VirusTotal plus reporting to the vendor, but users still lose time to quarantined files and warnings on friends' PCs.
- **AutoHotkey blocked or banned in games with anti-cheat** (integrations): Battlefield, Apex, THE FINALS and other anti-cheat systems flag AHK or refuse to launch while it runs. The FAQ says anti-cheat such as GameGuard/Hackshield often blocks AutoHotkey entirely. Players report errors and some account bans; closing AHK before launching is the common workaround.
- **AutoHotkey v2 error: This line does not contain a recognized action** (usability): Load-time errors such as 'Function calls require a space or (' and 'does not contain a recognized action' are the usual symptom of v1-style syntax running under the v2 interpreter, often from copied forum or ChatGPT snippets. The error text rarely tells beginners which version the code was written for.
- **Is AutoHotkey hard to learn? It is a programming language** (onboarding): Beginners expect a point-and-click macro tool and find a scripting language with its own syntax, two incompatible versions, and tutorials that mix v1 and v2. Community advice is to learn v2 only and avoid old v1 videos.
- **AutoHotkey Send not working in games and some apps** (reliability): Send, Click and hotstrings often do nothing in games and apps that read raw input. Official fixes are longer key delays, SendPlay/ControlSend or separate down/up events, but SendPlay is deprecated and may do nothing on Windows 11.
- **AutoHotkey modifier key stuck after Send** (reliability): Ctrl, Alt, Shift or Win can appear stuck after a script's Send, because Send may re-press a modifier it temporarily released. Terminating the script does not always release it. Users fix it by switching Send mode, adding delays or tapping the modifiers.
- **Is it safe to run downloaded AutoHotkey scripts?** (security): An .ahk file can do anything the user can: run programs, read files, send keystrokes. Because AHK is also used in malware loaders, security vendors treat random scripts and compiled exes with suspicion. Only run scripts you have read.
- **AutoHotkey has no official support, only forum and Reddit** (support): Help comes from the community forum and r/AutoHotkey. Docs are thorough but dense, and error messages do not always point to the cause. Many threads are v1-era and give outdated answers for v2.
- **AutoHotkey is Windows only (no Mac, Linux or phone)** (mobile): AHK works on Windows only. Mac and Linux users need other tools such as Keyboard Maestro, Hammerspoon, espanso or AutoKey, and scripts do not port.
- **AutoHotkey hotkeys not working with non-English keyboard layouts** (customization): Letter hotkeys such as `q::` depend on the active layout, so they are inactive when the layout has no such key. Users bind by scan code (for example sc010) and check Key History to find the right code.
- **AutoHotkey script slow or lagging under heavy CPU load** (performance): Hotkeys, clicks and sends can lag when the PC is busy. The FAQ suggests adding ProcessSetPriority High near the top of the script.

## What users like

- **Completely free and open source**: No license, no subscription, no telemetry account. GPL-licensed with active development.
- **Remap anything and automate almost any Windows task**: Hotkeys, hotstrings, window control, clicks, GUIs, COM and DLL calls from one small language.
- **Tiny and fast**: Scripts use little memory and start instantly; the runtime is a few MB.
- **v2 is cleaner and more consistent than v1**: v2 removes many v1 quirks (consistent expressions, real functions, exceptions) and the maintainers promise v2.x scripts keep working until v3.
- **Compile scripts to standalone exes**: Ahk2Exe turns a script into a portable exe you can share, though antivirus may flag it.
- **Large community and script library**: A long-running forum, active subreddit and many open-source libraries and examples.

## Pricing

- **Free (open source)**: $0.00 (free) — hidden costs: Your time: no GUI builder, no support desk. Compiled exes may trigger antivirus warnings, and games with anti-cheat may ban its use.

## Who should and shouldn't use it

- **Windows power users and sysadmins** — Good fit: Custom shortcuts and automations for free, with huge flexibility.
- **Developers comfortable scripting** — Good fit: Small language, quick to automate repetitive desktop tasks.
- **Heavy typists needing text expansion** — Depends: Hotstrings work well, but TextExpander or espanso have friendlier snippet management.
- **Non-technical users wanting point-and-click macros** — Avoid: It is a programming language with no recorder; PowerToys is simpler for common remaps.
- **Competitive online gamers** — Avoid: Anti-cheat often blocks AHK and bans are reported.
- **Mac or Linux users** — Avoid: Windows only.
- **People with existing v1 scripts** — Depends: Keep v1 installed or budget time to port; the two versions can coexist.
- **Accessibility and keyboard remapping needs** — Good fit: Can remap any key and tailor input to personal needs.

## Alternatives

- **Microsoft PowerToys** (https://www.tryorbye.com/products/powertoys): Free from Microsoft with Keyboard Manager for remaps and PowerToys Run launcher; no scripting needed. Trade-off: far less flexible and its remaps also fail in admin apps.
- **Alfred** (https://www.tryorbye.com/products/alfred): Mac launcher with workflows and snippets for people who want automation on macOS. Trade-off: macOS only and Powerpack is paid.
- **Raycast** (https://www.tryorbye.com/products/raycast): Launcher with extensions, snippets and scripts, now also on Windows. Trade-off: some features need a paid plan and it is not a general scripting language.
- **TextExpander** (https://www.tryorbye.com/products/textexpander): Polished snippet manager with sync, replacing AHK hotstrings. Trade-off: subscription.
- **Espanso** (https://www.tryorbye.com/products/espanso): Free cross-platform open-source text expander (Windows, Mac, Linux). Trade-off: text expansion only, YAML config.
- **Keyboard Maestro** (https://www.tryorbye.com/products/keyboard-maestro): The macOS automation standard with a visual macro editor. Trade-off: Mac only, paid license.
- **Hammerspoon**: Free Lua scripting for macOS, the closest AHK-style tool on Mac. Trade-off: steeper learning curve.

## FAQ

### Is AutoHotkey safe?

AutoHotkey from autohotkey.com is open source and widely used. Your risk comes from the scripts you run: an .ahk file can run programs, read files and send keystrokes, so only run scripts you have read. Antivirus engines often flag the AHK compiler and compiled scripts; the official FAQ calls most of these false positives.

### Why is my AutoHotkey script not working?

The usual causes are a v1/v2 mismatch (the script was written for the other version), the target window running as administrator, the script not actually running (check the tray icon), or a hotkey clashing with another program. Add `#Requires AutoHotkey v2.0` to the top to catch version mismatches.

### Is AutoHotkey free?

Yes. AutoHotkey is free and open source (GPL-2.0), including for commercial use. There is no paid tier.

### Should I use AutoHotkey v1 or v2?

Use v2 for new scripts: it is the current version, cleaner, and v1 gets no new features. Keep v1 only for large existing scripts you do not want to port. Both can be installed side by side.

### Why does AutoHotkey not work in some windows?

If the window runs as administrator, a normal-privilege script is blocked by Windows UIPI. Run the script as administrator, or install AHK under Program Files and run it with UI Access.

### Can you get banned for using AutoHotkey in games?

It is possible. Anti-cheat in several online games flags or blocks AHK, and players report errors and some bans. Check the game's policy and close AHK before launching games with strict anti-cheat.

### Why does antivirus say AutoHotkey is a virus?

AHK scripts and compiled exes behave like input automation tools, which heuristics flag, and AHK is also abused by malware. Check the file on VirusTotal, report false positives to the vendor, and avoid compressing compiled scripts with UPX or MPRESS.

### How do I run an AutoHotkey script at startup?

Create a shortcut to the script, press Win+R, type shell:startup, and paste the shortcut into the folder. For all users use shell:common startup (needs admin).

### How do I convert an AutoHotkey v1 script to v2?

Change `=` assignments to `:=`, turn commands into function calls with quoted text, replace `%var%` with concatenation, wrap hotkey bodies in braces, and replace ErrorLevel with try/catch. A community converter handles simple scripts but has gaps, so test the result.

### Does AutoHotkey work on Mac or Linux?

No. AutoHotkey is Windows only. On Mac use Keyboard Maestro or Hammerspoon; espanso works for text expansion on all platforms.

### Is AutoHotkey worth learning?

If you spend your day on Windows and repeat tasks or want custom shortcuts, yes: it is free and small. If you only need a few remaps, PowerToys Keyboard Manager is quicker.

### Why is my AutoHotkey modifier key stuck?

Send can re-press a modifier it temporarily released. Try SendEvent, add a short delay, and tap Ctrl, Alt, Shift and Win to unstick. Stopping the script does not always release it.

### What are the best AutoHotkey alternatives?

PowerToys for simple remaps on Windows, espanso or TextExpander for text expansion, Raycast or Alfred as launchers, and Keyboard Maestro or Hammerspoon on Mac.

---
Try or Bye aggregates problem patterns from user reviews, forums, and app stores. Methodology: https://www.tryorbye.com/methodology