These are the most common ask AHK questions.

Variables V2

1. Variable Basics:

   - In AutoHotkey v2, variables are used to store data such as numbers, strings, objects, and arrays.

   - Variable names are case-insensitive and can consist of letters, numbers, and underscores, but must begin with a letter.

   - Variables don't require explicit declaration; they are created automatically when first assigned a value.

2. Variable Types:

   - **Numeric Variables:** These hold numerical values, including integers and floating-point numbers.

   - **String Variables:** These store sequences of characters, enclosed in double quotes (`"`) or backticks (`` ` ``).

   - **Object Variables:** These reference complex data structures or objects created with AHK's built-in classes.

   - **Array Variables:** These store collections of values accessed by numerical or string indices.

**3. Variable Assignment:**

   - Assign values to variables using the `:=` operator.

   - Example:

     myNumber := 10

     myString := "Hello, World!"

**4. Variable Concatenation:**

   - Concatenate strings using the `.` operator.

   - Example:

     firstName := "John"

     lastName := "Doe"

     fullName := firstName . " " . lastName

     ; fullName now holds "John Doe"

**5. Variable Interpolation:**

   - Embed variables within strings using double quotes and the `%` prefix.

   - Example:

     age := 30

     MsgBox "I am %age% years old."

**6. Built-in Variables:**

   - AutoHotkey v2 provides several built-in variables that contain information about the script, system, or environment.

   - Example:

     MsgBox % A_ScriptName  ; Displays the name of the currently running script.

**7. Global vs. Local Variables:**

   - By default, variables are global, meaning they can be accessed from anywhere in the script.

   - Use the `Local` keyword to declare variables as local within a specific function or block.

   - Example:

     GlobalVar := 10

     myFunction() {

         Local localVar := 20

         MsgBox "GlobalVar: " GlobalVar ", localVar: " localVar



**8. Variable Scope:**

   - The scope of a variable determines where it can be accessed within a script.

   - Variables declared outside of functions are global and can be accessed from anywhere.

   - Local variables are accessible only within the function or block in which they are declared.

**9. Dynamic Variable Names:**

   - Use square brackets to create dynamic variable names.

   - Example:

     index := 1

     varName := "myVar" index

     %varName% := "Dynamic Variable"

     MsgBox % myVar1  ; Displays "Dynamic Variable"

**10. Variable Manipulation:**

   - AutoHotkey provides built-in functions for manipulating variables, such as `StrLen()` for string length and `SubStr()` for substring extraction.

Understanding variables is fundamental to scripting with AutoHotkey v2. With these basics, you can start creating more complex scripts to automate tasks and customize your Windows experience!

Game Info List

All the facts we know so far for gaming with AHK

Add A Game

Just send over an email to tadamm88@gmail.com with the games name and details


  • Info is here and there. Most seem to be okay using one for one remaps but reports of getting banned for using autohotkey scripts that don't even have anything to do with the game

  • Best to close all AHK scripts before running the game.

Apex Legends

  • Works in windowed mode with border/borderless

  • Against TOS when doing more than 1 for 1 remapping.

  • People have used scripts a ton not getting banned but it can happen.

BattleBit Remasted

  • AHK is a luck-based thing. Some people get bans and others don't, people have been saying it's detected for a long time but some have used for 100+ hours. Seems it could be based of player reporting.

Bloons TD 6

  • Does not accept control send, must be open and active.

  • Hacking can cause the account to become flagged, which will lead to Ninja Kiwi to investigate the player's account for any suspicious behavior, and eventually may cause the account to become "banned" if found guilty. Those affected by the flag will show a subtle pair of leaves above the settings button.

  • Works in both windowed and fullscreen

Call of Duty: Modern Warfare (2019) a.k.a. "Warzone"

  • Works fine in windowed borderless

  • Don't use it in a tournament.

Clan war ninja saga

- Window must be active window, Control sends wont work. No info on bans

Counter Strike

  • Works in Windowed Mode.

  • Not working in Full Screen Mode.

Dead by Daylight

  • Works in Windowed

  • Works in Fullscreen

  • Does not work in stretch resolutions sometimes

Destiny 2

- AutoHotKey works with Destiny 2.

- Destiny 2 only accepts inputs if the window is active (The game ignores any input until it is back in focus).

- Destiny 2 has suspended accounts for AFK scripts.

- Destiny 2 uses the "Battleye" Anti-Cheat.

Diablo 3

  • Likes a small sleep between up/down events

  • Use windowed mode

  • Does pretty good with rapid keypresses


  • Very Limted on what you can do

  • Is aginst there TOS so could be banned. (they do have bots if you run your own server)


  • Single key maps are ok

  • more than that will get account banned

Elden Ring

  • Works very well with send commands but not need any sleeps for script.

  • Works fine in window mode and full screen unlike most games!

Empyrion: Galactic Survival

  • Works in windowed mode

Escape from Tarkov

  • Against TOS and people have been banned even for simple menu scripts

  • Very fast to ban for crosshair over lay

Fall Out 4

-Run the script as administrator.

Final Fantasy XI

  • Generally needs #UseHook

  • Windows 10 user need to start script in administrator mode enabled as the game need to be in administrator mode as well to run.


  • Works in window mode and full screen window

  • Doesn't work in Full screen

  • Can get banned playing online but seems simple key remapping is okay

Global Poker

  • Using employed or made use of a system (including machines, computers, software or other automated systems such as bots) designed specifically to gain an unfair advantage will get you banned pretty fast

  • very big on detecting auto mouse clicks

  • Life time ban with no chance to unlock account


  • Works fine in single player but multi can get you banned but seems rare

  • Will not work when running from a macro creator

Guild wars 2

  • Works Well

  • Allowed for playing music in the game or for some non-gameplay related things

  • Gameplay is restricted to one-key press per action

  • Official policy here: https://help.guildwars2.com/hc/en-us/articles/360013762153-Policy-Macros-and-Macro-Use

Halo: The Master Chief Collection

  • Works Borderless

  • Works Windowed

  • Doesn't work Fullscreen

Hell Divers

  • Reports of people getting banned even for simple 1 to 1 key remaps

Last Epoch

  • Per the games dev. team AHK hotkeys are okay as long as it does not have anything that manipulates or controls gameplay

League of Legends

  • Likes a sleep between up/down events

  • Use windowed mode

Left 4 Dead 2

  • Works in Windowed and Windowed Fullscreen

  • Doesn't work in Fullscreen

  • Crossover doesn't work with fullscreen

Lost Ark

- 1 for 1 key rebinds are ok but a script that gives you an advantage will get you blocked. this is per an email from the company.

Maple Story

- No bans reported.

Metro Exodus Gold Edition

  • It doesn't work under any circumstances


  • Works well

  • pixel and image search very poor as blocks randomize particles

  • Bans come from server host so up to them

  • Contral send works but need to add SetKeyDelay, 0, 50 at the start of the script.


  • Works in Windowedand Windowed Fullscreenmode

  • Does not work in full screen

  • It's bannable. There have been several reports on here of people getting their accounts banned for having AHK running while playing, even when they're not using it within OW.

Path of Exile

  • Requires a delay between moving the mouse and doing the actual click, otherwise it will click at current position then move the mouse to the coordinates.

  • More then one action per click is against TOS


  • Works in Windowed Fullscreen mode

  • Doesn't work in Fullscreen mode

Planetside 2

  • Works in Windowed and Windowed Fullscreen

  • Doesn't work in Fullscreen

Rainbow 6

- Permeant ban and will not unban no matter what. - AHK cannot be running while playing even if not for the game.


  • Works well but sleeps are needed between sends and clicks. sleep 250 seems to work fine. No reports of banning for automating button press

  • Can be banned for creating chat spamming bots.

  • Contralsend or Contralclicks will not work. Game needs to be active window


  • Works well on most tried so far. Have to use sends/sleeps mostly. A Small sleep between each send is recommend (only need like 100ms)


  • Works in window full screen mode

South Park: The Stick of Truth:

  • Requires regular reinstatements of #UseHook

  • This game regularly overrides key hooks causing working scripts to stop working until reloaded

Tom Clancy's The Division 2

  • Works in Windowed Fullscreenmode

  • Doesn't work in Fullscreenmode


  • Works well as long in you are in window mode

  • Known for banning AHK so need to complie script 


  • Works well. Some sends may need a small sleep between each one

  • Bans come from server host so up to them.


  • Works well

  • Known for banning people using AHK best to compile.

War Frame

- 1 for 1 remapping is ok per TOS

- Can get banned for AHK scripts out side of 1 for 1 remaps


  • It works pretty well. Usually combine it with Bluestacks own macro recorder. Pixel search is difficult as colors are somewhat dynamic/changing. It is almost entirely mouse moves and clicks.

World of Warcraft

  • Works well but very big on banning.

  • Most peoples accounts will get banned with in a month or two and they will not unban you.

  • The AI is one of the best in looking for automating scripts.

Will Not Work With AHK

  • Wolfenstein: The New Order