Winformer v1.01
v1.00 - 11/6/08 (Initial release date)
v1.01 - 12/28/08
v1.02 - 3/6/09
Change Log:
- Added Coordmode, thanks tonne
- Removed physical window activation
- Changed coordmode to mouse/relative
Basic Information:
Winformer displays information on the window and control that's currently under your mouse. It shows the title/type, size, location, and handle for the window and control. It also shows the mouse position relative to the screen and the active window. This tool is similar to the Window Spy utility that's bundled with AutoHotKey, it's just condensed and focused a little differently. The objective is to indirectly help some of the beginners figure out some simple concepts about windows and controls and make it easier for developers to find the relative locations to use with the control functions. It helps you target the specific control you want (which can be confusing) and it shows you the different relative locations within that control.
Main Features:
- Window title and control type
- Window and control handle
- Window and control location
- Window and control size
- Mouse position relative to the screen
- Mouse position relative to the window under the mouse
- Screen resolution
Gui Screen:
Source Code:
Code:
Menu, Tray, Tip, Winformer By Precise
SetWorkingDir %A_ScriptDir%
SendMode Input
#NoEnv
Gui +Owner +OwnDialogs +AlwaysOnTop
Gui, Font, cBlack s7, Verdana
Gui, Add, GroupBox, x8 y3 w256 h115, Window
Gui, Add, Listbox, w240 r1 x15 y18 vScreenSize, Screen:%A_Tab%%A_ScreenWidth%x%A_ScreenHeight%
Gui, Add, Listbox, w240 r1 x15 y+3 vWinName, Name:
Gui, Add, Listbox, w240 r1 x15 y+3 vWinHandle, Id:
Gui, Add, Listbox, w240 r1 x15 y+3 vWinDim, Dim:
Gui, Add, Listbox, w240 r1 x15 y+3 vWinLoc, Loc:
Gui, Add, GroupBox, x8 y123 w256 h60, Mouse
Gui, Add, Listbox, w240 r1 x15 y139 vMouseLoc, Loc:
Gui, Add, Listbox, w240 r1 x15 y+3 vMScreenLoc, SLoc:
Gui, Add, GroupBox, x8 y187 w256 h100, Control
Gui, Add, Listbox, w240 r1 x15 y204 vCtrlType, Type:
Gui, Add, Listbox, w240 r1 x15 y+3 vCtrlHandle, Id:
Gui, Add, Listbox, w240 r1 x15 y+3 vCtrlDim, Dim:
Gui, Add, Listbox, w240 r1 x15 y+3 vCtrlLoc, Loc:
Gui, Show,, Winformer
Updater:
;===============
CoordMode,Mouse,Relative
MouseGetPos, MouseX, MouseY, WinHandle, CtrlHandle, 2
WinGetTitle, WinName, ahk_id %WinHandle%
WinGetPos, WinX, WinY, WinWidth, WinHeight, %WinName%
StringReplace, WinName, WinName, |, l, All
If WinName =
GuiControl,, WinName, |Name:
Else
GuiControl,, WinName, |Name:%A_Tab%%WinName%
If WinHandle =
GuiControl,, WinHandle, |Id:
Else
GuiControl,, WinHandle, |Id:%A_Tab%%WinHandle%
If WinX =
dimb = yes
If WinY =
dimb = yes
if dimb = yes
{
GuiControl,, WinLoc, |Loc:
dimb = no
}
Else
GuiControl,, WinLoc, |Loc:%A_Tab%(%WinX%`, %WinY%)
If WinWidth =
dimb = yes
If WinHeight =
dimb = yes
if dimb = yes
{
GuiControl,, WinDim, |Dim:
dimb = no
}
Else
GuiControl,, WinDim, |Dim:%A_Tab%%WinWidth%x%WinHeight%
If MouseX =
dimb = yes
If MouseY =
dimb = yes
if dimb = yes
{
dimb = no
GuiControl,, MouseLoc, |Loc:
GuiControl,, MScreenLoc, |SLoc:
}
Else
{
MScreenX := (MouseX + WinX)
MScreenY := (MouseY + WinY)
GuiControl,, MouseLoc, |Loc:%A_Tab%(%MouseX%`, %MouseY%)
If MScreenX =
dimb = yes
If MScreenY =
dimb = yes
if dimb = yes
GuiControl,, MScreenLoc, |SLoc:
Else
GuiControl,, MScreenLoc, |SLoc:%A_Tab%(%MScreenX%`, %MScreenY%)
}
If CtrlHandle =
{
GuiControl,, CtrlHandle, |Id:
GuiControl,, CtrlDim, |Dim:
GuiControl,, CtrlLoc, |Loc:
GuiControl,, CtrlType, |Type:
}
Else
{
ControlGetPos, CtrlX, CtrlY, CtrlWidth, CtrlHeight,, ahk_id %CtrlHandle%
WinGetClass, CtrlType, ahk_id %CtrlHandle%
CtrlLoc = (%CtrlX%`, %CtrlY%)
CtrlDim = %CtrlWidth%x%CtrlHeight%
GuiControl,, CtrlDim, |Dim:%A_Tab%%CtrlDim%
GuiControl,, CtrlLoc, |Loc:%A_Tab%%CtrlLoc%
GuiControl,, CtrlHandle, |Id:%A_Tab%%CtrlHandle%
GuiControl,, CtrlType, |Type:%A_Tab%%CtrlType%
}
Goto, Updater
GuiClose:
ExitApp
Download Links:
Mediafire - Winformer v1.02
MegaUpload - Winformer v1.02