Whenever I try to launch the Windows Spy utility in AutoHotkey, it fails with an error "Could not launch file: U:\Software\AutoHotkey_1.1.26.00\AU3_Spy.exe"
Initially I thought that I may have had a corrupted download. However, after redownloading AHK from the official website, I could not find any file named AU3_Spy.exe
in ahk.zip
.
After some research, I've discovered that the portable version of AHK is missing AU3_Spy.exe, which seems to be required for Window Spy to run.
Window Spy or AU3_Spy.exe
is a program which can be used to retrieve information about a window for scripting.
While it isn't included with the portable version of AHK ahk.zip
, you can use 7-Zip to extract AU3_Spy.exe
from the AutoHotkey installer.
Download the AutoHotkey installer (https://www.autohotkey.com/download/)
Open installer file using 7-Zip and extract AU3_Spy.exe
.
Place AU3_Spy.exe
in your AutoHotkey folder.
While running AHK, right-click the AHK icon in the notification area and select Window Spy.
Done! You can now click any window to retrieve useful information such as window title, mouse position, and controls.
TL;DR: All older answers are now obsolete and don't reflect current situation.
The last release that includes standalone Windows Spy utility is 1.1.26.01.
Here is the link to 1.1.26.01 installer download.
Since v1.1.27.00, AutoHotKey_L no more includes Windows Spy utility (AU3_spy.exe
) as a standalone exe; it is replaced by WindowSpy.ahk
as noted in comment of another answer. Here is the relevant excerpt of release announcement:
Replaced AU3_Spy.exe with WindowSpy.ahk.
- AU3_Spy.exe is still launched if WindowSpy.ahk is not found.
- It now follows the focused control by default, and has a checkbox for both window and control to follow the mouse.
- It no longer takes over a global hotkey (Win+A). Instead, hold Ctrl or Shift to suspend updates (release them after focusing Window Spy).
- It is now possible to Alt-Tab to Window Spy on Windows 10 without the contents of the GUI changing.
As other answers have stated, use 7-Zip to extract AU3_spy.exe
within the installer, then place it in any location of your favorite choice, and call it a day.
For 1.1.x users, they can actually use the new spy script to get equivalent functionality.
But not so fortunate for AutoHotKey 2.0 alpha/beta users, as the script was written in 1.x language, which is incompatible with 2.0. For them, getting the standalone exe is the only option. (There exists other replacement utilities, such as Spy++ from Visual Studio, but not as convenient.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With