Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is AU3_Spy.exe? Where can I find it?

Tags:

autohotkey

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.

  • What is AU3_Spy.exe?
  • Why wasn't it included with AutoHotkey?
  • Where can I find the missing file?
like image 293
Stevoisiak Avatar asked Aug 07 '17 17:08

Stevoisiak


2 Answers

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.


  1. Download the AutoHotkey installer (https://www.autohotkey.com/download/)

    AutoHotkey Download

  2. Open installer file using 7-Zip and extract AU3_Spy.exe.

    Extracting AU3_Spy.exe

  3. Place AU3_Spy.exe in your AutoHotkey folder.

    Placing AU3_Spy.exe in Autohothey folder

  4. While running AHK, right-click the AHK icon in the notification area and select Window Spy.

    Selecting window spy

  5. Done! You can now click any window to retrieve useful information such as window title, mouse position, and controls.

    Window Spy in use

like image 144
Stevoisiak Avatar answered Sep 29 '22 21:09

Stevoisiak


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.)

like image 38
Abel Cheung Avatar answered Sep 29 '22 21:09

Abel Cheung