Unofficial AutoHotkey FAQ

Note: this page comes from the AutoHotkey Wiki which has been removed.
It hopefully serves a purpose until the official faq can be edited in the new documentation setup.
It is a good idea to check the official documentation to see if a new FAQ is available - April 2012

Purpose

This page is meant to list and categorize important forum threads, which answer the most frequently asked questions concerning AutoHotkey. It is a community effort to supplement the official FAQ page. If you have suggestions or would like to contribute, discuss it here: forum topic.

See the ahk2exe notes: As of v1.1.01, password protection and the /NoDecompile switch are not supported. Mpress can be used to compress the script executable. This also compresses the script source code. (Note: See AHK_L Decompiler below)

Games

Commands

Click / MouseClick >> Clicks a mouse button at the specified coordinates. It can also hold down a mouse button, turn the mouse wheel, or move the mouse.

ImageSearch >> ImageSearch can be used to detect graphical objects on the screen that either lack text or whose text cannot be easily retrieved. For example, it can be used to discover the position of picture buttons, icons, web page links, or game objects. Once located, such objects can be clicked via Click.

PixelSearch >> Searches a region of the screen for a pixel of the specified color.

PixelGetColor >> Retrieves the color of the pixel at the specified x,y coordinates.

Loop >> Perform a series of commands repeatedly: either the specified number of times or until Break is encountered.

SetTimer >> Causes a subroutine to be launched automatically and repeatedly at a specified time interval.

Troubleshooting

Why do Hotstrings, Send, and Click have no effect in certain games?

Not all games allow AHK to send keys and clicks or receive pixel colors.

But their are some alternatives, try all the solutions mentioned below.
If all these fail, it may not be possible for AHK to work with your game.
Sometimes games have a hack and cheat prevention measure, such as GameGuard and Hackshield. If they do, there is a high chance that AutoHotkey will not work with that game.