Page 1 of 2

WinSpy - Window Information Tool

Posted: 16 Feb 2017, 16:29
by Alguimist
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)

Re: WinSpy - Window Information Tool

Posted: 18 Feb 2017, 03:32
by FanaticGuru
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

Re: WinSpy - Window Information Tool

Posted: 18 Feb 2017, 08:05
by guest3456
very nice

Re: WinSpy - Window Information Tool

Posted: 20 Feb 2017, 04:23
by jNizM
Again great tool Alguimist.
I hope one day you move to GitHub.

Re: WinSpy - Window Information Tool

Posted: 27 Mar 2017, 03:42
by Tomer
Awesome!
Thank you Alguimist!

Re: WinSpy - Window Information Tool

Posted: 27 Mar 2017, 07:22
by TheDewd
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.

Re: WinSpy - Window Information Tool

Posted: 05 May 2017, 18:10
by Alguimist
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

Re: WinSpy - Window Information Tool

Posted: 05 May 2017, 18:48
by Flipeador
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!

Re: WinSpy - Window Information Tool

Posted: 05 May 2017, 19:38
by RUNIE
jNizM wrote:I hope one day you move to GitHub.
+1

Re: WinSpy - Window Information Tool

Posted: 05 May 2017, 22:12
by 20170201225639
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

Re: WinSpy - Window Information Tool

Posted: 08 May 2017, 08:45
by Alguimist
Flipeador wrote:2. In the four tab (Extra), i get "FAIL" in all items in Scintilla control.
How can I reproduce the error?

Re: WinSpy - Window Information Tool

Posted: 08 May 2017, 09:22
by Flipeador
Alguimist wrote:How can I reproduce the error?
Just test it in SciTE4AutoHotkey. Maybe it's the SCIntilla version... :lolno:

Re: WinSpy - Window Information Tool

Posted: 18 Aug 2017, 21:44
by Alguimist
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

Re: WinSpy - Window Information Tool

Posted: 22 Aug 2017, 06:57
by Tomer
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
}

Re: WinSpy - Window Information Tool

Posted: 22 Aug 2017, 15:14
by Alguimist
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++.

Re: WinSpy - Window Information Tool

Posted: 22 Aug 2017, 23:48
by Tomer
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

Re: WinSpy - Window Information Tool

Posted: 24 Aug 2017, 11:55
by Helgef
I tried it, it looks very professional and works great. Thanks for sharing :thumbup:
I like Tomer's suggestion.

Re: WinSpy - Window Information Tool

Posted: 02 Dec 2017, 10:11
by desgen
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].

Re: WinSpy - Window Information Tool

Posted: 02 Dec 2017, 10:49
by Alguimist
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.

Re: WinSpy - Window Information Tool

Posted: 02 Dec 2017, 11:15
by playthegammee
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.