WinSpy - Window Information Tool

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

WinSpy - Window Information Tool

16 Feb 2017, 16:29

Image

Information that can be retrieved with WinSpy:
• Window/control handle
• Window title
• Control text
• Window/control class
• Control ClassNN
• Window/control position
• Window/control size (window and client dimensions)
• Cursor position (relative to screen, window or client)
• Window/control styles
• Window/control extended styles
• Additional styles for some controls
• Detailed style information including description
• Control ID
• Font name, size and style
• Details about the class (style, handles, etc)
• Tab order index
• Help context ID
• Window properties (data defined with SetProp)
• Menu information (strings, keyboard shortcuts, item ID)
• Scroll bar information
• List of child windows
• List of sibling windows
• Parent window
• Owner window
• Process information (executable path, version, PID, image type, etc)

The "Extra" tab can display additional information for the following control types:
• Scintilla
• Edit
• Toolbar (button ID and string)
• SysHeader32 (column text and width)
• ListView (items)
• ListBox (items)
• ComboBox (items)
• Progress bar
• Status bar (text)
• Tab control (text)

Actions that can be performed with WinSpy:
• Change window title or control text
• Change window/control position and size
• Change window/control styles
• Change the visibility of the window/control
• Enable/disable controls
• Set a window to be always on top
• Redraw the window/control
• Close the window/control
• Send Windows API messages to the window/control
• Terminate the process associated with the window
• Open the folder location of the process
• Search for a particular window/control based on multiple criteria (text, class, process)
• Display a hierarchical tree of all windows and controls in the system
• Create a screenshot of the window or control

All information of the current tab can be copied to the clipboard with the "Copy" button.

F1 displays a list of keyboard shortcuts.

Credits to James Brown (WinSpy++ developer) and Lexicos.

:arrow: Download (Included: AHK script and executables for x86 and x64)
Last edited by Alguimist on 08 Sep 2018, 05:52, edited 1 time in total.
User avatar
FanaticGuru
Posts: 1906
Joined: 30 Sep 2013, 22:25

Re: WinSpy - Window Information Tool

18 Feb 2017, 03:32

I have used this a few times in the past 2 days and like it pretty well. It provides a wealth of information and lots of features to play around with.

This is going to be my new go-to for getting Window information.

I have tried WinSpy++ in the past but this seems better. That it is written in AHK is a bonus.

Thanks for the work.

FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts
AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon
Hotstring Manager - Create and Manage Hotstrings
[Class] WinHook - Create Window Shell Hooks and Window Event Hooks
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: WinSpy - Window Information Tool

20 Feb 2017, 04:23

Again great tool Alguimist.
I hope one day you move to GitHub.
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
User avatar
Tomer
Posts: 366
Joined: 21 Aug 2016, 05:11

Re: WinSpy - Window Information Tool

27 Mar 2017, 03:42

Awesome!
Thank you Alguimist!
User avatar
TheDewd
Posts: 1507
Joined: 19 Dec 2013, 11:16
Location: USA

Re: WinSpy - Window Information Tool

27 Mar 2017, 07:22

Awesome! I like this very much! I tried the uncompiled script, and my only suggestion is to disable the "Finder Tool" while the mouse cursor is hovering over the WinSpy Gui.
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: WinSpy - Window Information Tool

05 May 2017, 18:10

Update (version 1.0.1):
- Toolbar buttons info (Extra tab): x64 compatibility
- Tab order index (Details tab): invisible controls were being counted
- Incorrect data types in DllCalls fixed by jNizM
User avatar
Flipeador
Posts: 1204
Joined: 15 Nov 2014, 21:31
Location: Argentina
Contact:

Re: WinSpy - Window Information Tool

05 May 2017, 18:48

Hi, Alguimist, good tool!.

Some things:
1. Limit the text range in the second edit control of the first tab. Why?, if the text is too long, the window gets hung.
2. In the four tab (Extra), i get "FAIL" in all items in Scintilla control.

Thanks!
User avatar
runie
Posts: 304
Joined: 03 May 2014, 14:50
Contact:

Re: WinSpy - Window Information Tool

05 May 2017, 19:38

jNizM wrote:I hope one day you move to GitHub.
+1
20170201225639
Posts: 144
Joined: 01 Feb 2017, 22:57

Re: WinSpy - Window Information Tool

05 May 2017, 22:12

if you use sublime text and want to quickly get a list of its wm_command message codes, you can use winspy's menu viewer (the menu id on the 3rd column is the wm_command code). it's really handy

http://img04.imgland.net/QykNtft.png
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: WinSpy - Window Information Tool

08 May 2017, 08:45

Flipeador wrote:2. In the four tab (Extra), i get "FAIL" in all items in Scintilla control.
How can I reproduce the error?
User avatar
Flipeador
Posts: 1204
Joined: 15 Nov 2014, 21:31
Location: Argentina
Contact:

Re: WinSpy - Window Information Tool

08 May 2017, 09:22

Alguimist wrote:How can I reproduce the error?
Just test it in SciTE4AutoHotkey. Maybe it's the SCIntilla version... :lolno:
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: WinSpy - Window Information Tool

18 Aug 2017, 21:44

Version 1.0.2:
- Fixed: Find window: find by PID
- Fixed: Messages tab
- Added: Scintilla messages
- Added: RichEdit messages and styles
- Minor improvements in Menu Viewer
- F1 shows the keyboard shortcuts

:arrow: Download
User avatar
Tomer
Posts: 366
Joined: 21 Aug 2016, 05:11

Re: WinSpy - Window Information Tool

22 Aug 2017, 06:57

suggestion:
its not always clear enough for some pepole that the image of the "Finder Tool" is a button or any action control.
you may change the mouse cursor to pointer and show a tooltip while mouse over onit.

sample:

Code: Select all

Gui Add, Button,w86 h48, test
Gui Show,

hCurs:=DllCall("LoadCursor","UInt",NULL,"Int",32649,"UInt") ;IDC_HAND
OnMessage(0x200,"WM_MOUSEMOVE")
Return


;The "hook"
WM_MOUSEMOVE(wParam, lParam, Msg)
{
Global hCurs
MouseGetPos,,,,ctrl
If ctrl in Button1
WM_MOUSEMOVE := "this is test button"
ToolTip % WM_MOUSEMOVE
;Only change over certain controls, use Windows Spy to find them.
If ctrl in Button1
DllCall("SetCursor","UInt",hCurs)
Return
}
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: WinSpy - Window Information Tool

22 Aug 2017, 15:14

I agree that the name "Finder Tool" may be confuse (if that's what you mean), but it's a concept common to window spy tools, since MS Spy++.
User avatar
Tomer
Posts: 366
Joined: 21 Aug 2016, 05:11

Re: WinSpy - Window Information Tool

22 Aug 2017, 23:48

Alguimist wrote:I agree that the name "Finder Tool" may be confuse (if that's what you mean), but it's a concept common to window spy tools, since MS Spy++.
I more focused on the action you have to do (drag and relase) rather than the name,
since AU3_Spy (for example) doesn't requires to make any action in the GUI itself , just to point on some window to get all details.
so may changing the mouse cursor to a "hand pointer" over the "finder tool" icon would make all the difference (will be clearer its a central "button"\controller) :)

Image
Helgef
Posts: 4709
Joined: 17 Jul 2016, 01:02
Contact:

Re: WinSpy - Window Information Tool

24 Aug 2017, 11:55

I tried it, it looks very professional and works great. Thanks for sharing :thumbup:
I like Tomer's suggestion.
desgen
Posts: 3
Joined: 14 Nov 2017, 23:16
Contact:

Re: WinSpy - Window Information Tool

02 Dec 2017, 10:11

Love the tool, suggestion:

Can you please consider adding a "WinSpy Log" tab?

It'll help noobs such as myself to see what/how WinSpy is doing what it's doing. Perhaps even, if you feel like it, adding a generate script option based off actions done within WinSpy. Also for Sendmessage/Postmessage adding the codes for the messages so you can see them rather than generic labels only [but that can also be seen in the log tab if you end up creating one, so it's no biggie].
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: WinSpy - Window Information Tool

02 Dec 2017, 10:49

What kind of information do you expect in a log tab? The information currently displayed in the tab can be copied with the Copy button (except the Messages tab). If you want to see the code for the messages, check them in Constants\Messages.ini, but I am considering to make the Copy button generate the SendMessage code for the Messages tab. I think I have not done that yet because it's a feature already present in AutoGUI and Constantine.
playthegammee

Re: WinSpy - Window Information Tool

02 Dec 2017, 11:15

This tool picks up elements in programs that other tools dont. Thank you!

In Python there is a tool that generates code https://www.youtube.com/watch?v=xaMFHOq_Hls

If you plan on expanding it one idea would be to let users generate the AHK code.

So for example, if I do a send message, or remove or add style maybe we can generate the code behind it speeding things up for development.

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 121 guests