AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AHK Window Info 1.7
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Wed Mar 29, 2006 9:36 pm    Post subject: AHK Window Info 1.7 Reply with quote

This script will reveal information on windows, controls, etc.
It is made public under the Attribution-NonCommercial-ShareAlike 2.5 licence from Creative Commons
it requires the latest AHK version.

ScreenShots of the 5 tabs (Version 1.4):
____
__

ScreenShots of the 3 option tabs (Version 1.4):
____

A larger list (which can be activated on the advanced tab) shows more data:
- a list of all controls and their properties of the window in question
- a list of all existing windows and their properties

Download the AHK Source Code

Change log:
Quote:
;changes since 1.6
; - added a small gap in the mouse picker grid to identify the center (thanks fade2gray)
; - adjusted groupbox size and tab size
; - added reset of picker to default color on dimensional change

;changes since 1.5
; - Groupboxes with bold text have been set -wrap, to fix line breaks on some windows themes
; - BGR is made default for color picker
; - update is stopped when mouse moves over its own gui, allowing easier graping of data, since no Pause key needs to be pressed.

;changes since 1.4
; - "H" replaced with Hwnd; "P" and "S" with "Pos" and "Size" on advanced tab for Control
; - GroupBox names have bold font
; - Mouse color picker is only updated when mouse tab is visible. Otherwise set to gray
; - set default for color picker to 15x15, since it only influences CPU load when the mouse tab is visible
; - controls list items are only updated when advanced tab is visible. Otherwise set to ">>>not updated<<<""
; - windows statusbar text is only updated when advanced tab is visible. Otherwise set to ">>>not updated<<<""
; - fast/slow visible/hidden window text are only updated when advanced tab is visible. Otherwise set to ">>>not updated<<<""
;todo
; - Window Info should be tested on Windows 9x

;changes since 1.3
; - last tab gets remebered between starts
; - large list hides automatically when tab is not "Advanced"
; - by default not rectangle is drawn around controls
; - gui starts NoActivate
; - fixed a problem with hidden gui and pause key
; - reduced impact in hidden mode on CPU load to nearly 0
; - to support 800x600 screen resolutions the advanced guis initial height is 600
; - instead of auto-update, update of data can be done on mouse click (button can be L/M/R, default M)
; - when started with "HideGui" turned on: GUI starts hidden, after 500 ms data is collected and GUI shown

;changes since 1.2
; - added: Control handle to advanced and list view
; - improved: fixed some spelling mistakes
; - fixed: option "Show tooltip at cursor" had no effect
; - fixed: option "Show tooltip at cursor" wasn't remembered between sessions
; - improved: For all DllCall's the types are put in quotes
; - changed: coordinates and sizes will have a space after the comma when put on clipboard
; - changed: the number of characters in the GUI for the list items is limited to 200. Clipboard will receive all
; - changed: "Introduction - Please Read" button moved to new info tab
; - changed: Renamed "active control in window" to "focused control in window".
; - fixed: Window Info refused to minimize while the right-side list was displayed.
; - changed: While Window Info is minimized, updating of data is turned off
; - fixed: Coordinates of GUI got stored when GUI got closed minimized

;changes since 1.1
; - added: OnExit routine that cleans up frame gui if script exits unexpectedly
; - changed: Tooltip of control frame disappears when mouse gets moved onto it.
; - changed: font size of GUI is now 6pt

;changes since 1.0
; - inproved: specified the font for the GUI, MS Sans Serif, 8 point
; - changed: for some OS (WIN_2000,WIN_NT4,WIN_95,WIN_98,WIN_ME) the icon is changed to ID 57
; - inproved: small features that simplify maintainance
; + combine update routines
; + simplify options actions
; + simplify Pause Key actions
; + reorder code
; - inproved: new method to capture fast/slow visible/hidden window text (Thanks Chris)
; - changed: Gui (advanced) now holds fields for fast/slow visible/hidden window text
; - added: option to switch color picker between RGB and BGR
; - inproved: color picker only updates when mouse moves or color below mouse changes. This reduces jittery update.
; - changed: Color picker now has a 15x15 color matrix
; - changed: checkbox "Show right List" changed to button that alternates between "More Info >>" and "<< Less Info".
; - added: check for miminum required AHK version
; - added: new option to turn auto-update automatically ON when Gui gets inactive (if it had been turned off (by pause or by the large list))


This script started originally in this old thread.
_________________
Ciao
toralf


Last edited by toralf on Tue Nov 06, 2007 6:57 pm; edited 16 times in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
evl



Joined: 24 Aug 2005
Posts: 1238

PostPosted: Wed Mar 29, 2006 10:05 pm    Post subject: Reply with quote

Glad to see further refinements Cool Is there a list of planned changes/improvements at all?

I noticed that when "Show right list" is ticked, and if you change tabs, it stays open.

Also, in Windows XP when not using the Windows XP theme (i.e. using the classic windows look) the text in the title of group boxes (like Control and Window) aren't highlighted in any way. Perhaps making them bold text would work in both cases (and older operating systems)?
Back to top
View user's profile Send private message
Laszlo



Joined: 14 Feb 2005
Posts: 3943
Location: Pittsburgh

PostPosted: Thu Mar 30, 2006 12:24 am    Post subject: Reply with quote

Very nice! Only one little problem: I use non-standard Windows fonts (large), which makes all the edit controls appear in the wrong place. Maybe the right font could be explicitly specified for the GUI.
Back to top
View user's profile Send private message
AHKnow*
Guest





PostPosted: Thu Mar 30, 2006 2:40 am    Post subject: Reply with quote

Awesome program. Worthy to be distributed with future releases of AutoHotkey.

One thing though, I do miss the "Advanced Tab's" "Show Window Text below" box from version 0.9. I thought it was a nice touch to have it go away or come back.
Back to top
robiandi
Guest





PostPosted: Thu Mar 30, 2006 5:45 pm    Post subject: Reply with quote

@toralf:
Quote:
Hmmm, .......... Could you maybe change your OS? Smile

Which icon would you choose for AHK Window Info (from the 108)?
Please tell me the Number and a description of how it looks.

I don't know which one to take.
For me this is not important, I have it posted because you didn't got an answer from the Guest
Back to top
AGU
Guest





PostPosted: Thu Mar 30, 2006 7:57 pm    Post subject: Reply with quote

Ok, I would vote for #23 oder #56.


_______________
Cheers
AGU
Back to top
AHKnow*
Guest





PostPosted: Fri Mar 31, 2006 8:58 am    Post subject: Reply with quote

My vote would be for #57 to replace #172 in the below line of code:

Code:
Menu, Tray, Icon, %IconFile%, 172   ;icon for taskbar and for proces in task manager
Back to top
evl



Joined: 24 Aug 2005
Posts: 1238

PostPosted: Mon Apr 10, 2006 6:10 pm    Post subject: Reply with quote

Hi toralf. I had an idea for another feature if you're interested. For quick scripts that just need to click on various things in a window, it can be a pain to record each mouse click and the time to wait in between. I was thinking about something like another tab or edit control that (when visible) hooks the left and right mouse buttons (maybe the middle one too) and records the location of any clicks and the time between clicks (e.g. using A_TickCount). There could be radio selection buttons for window or screen relative co-ordinates and optionally record the title of the active window (perhaps only when it changes).
Back to top
View user's profile Send private message
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Tue Apr 11, 2006 10:11 am    Post subject: Reply with quote

Yes, I think that would be an improvement. But this is more related to a auto script writter. I know that other people are working on such a thing. Therefore I do not integrate this into Window Info.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Sun Apr 16, 2006 6:12 pm    Post subject: Reply with quote

Updated to Version 1.1 in first post.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Laszlo



Joined: 14 Feb 2005
Posts: 3943
Location: Pittsburgh

PostPosted: Sun Apr 16, 2006 7:00 pm    Post subject: Reply with quote

I thought it could not be improved any more. I was wrong. Good job!

A few minor problems:
- With the default font in my system, the GUI window still looks ugly: the edit boxes are shifted unevenly to the right. Maybe not only the font-size, but also the name of the font should be specified.
- When the tooltip shows the name of the control under the mouse cursor, it could cover another control. I have to move the mouse and come back to see, what is under the tooltip. It was nicer, if the tooltip could disappear, when the mouse cursor gets inside the tooltip.
- When the GUI of the script is active, it does not show the window information under the mouse, I have to click somewhere else, first. After that, the information is shown about the window under the cursor, even if another window is active. It looks inconsistent.
Back to top
View user's profile Send private message
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Sun Apr 16, 2006 7:24 pm    Post subject: Reply with quote

Thanks for the feedback,

1) It is specified on line 203:
Code:
Gui, 1:Font, s8, MS Sans Serif
Could you please tell me which font shows the GUI nicely on your system?

2) I look into it. But if you move the mouse slowly in the direction of the tooltip, it should work well.

3) This is by design, since the update has to stop when the GUI gets active. This allows to use Alt+Tab. It also prevents the data to change accidently if the mouse slips off the GUI.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Laszlo



Joined: 14 Feb 2005
Posts: 3943
Location: Pittsburgh

PostPosted: Sun Apr 16, 2006 8:46 pm    Post subject: Reply with quote

(1) In my system 6 pt MS Sans Serif font makes the controls nice and aligned. (I have 125% magnified fonts, 120 DPI; 120/96 = 1.25). It could be read from the registry, and used as a correction factor: 8/1.25 = 6.4 ~ 6pt). I experienced this kind of problems with many commercial programs, like with my favorite editor, MultiEdit 9.10. Its customization dialogs suck really badly. I paid $200 for it.

(2) In MSIE, the Google search box is covered with the tooltip. It does not mater if I move the mouse slowly or quickly, until another control gets highlighted, the search box is covered, and no information can be obtained about it.

(3) It makes sense… Have you tried a Freeze! hotkey, instead? I don't know if it is any easier to use, though.
--- ---
(4) Here is something to think about: I have a Gui (analog clock), with transparent background, but opaque hands. Your script shows the window info, but I cannot get anything about other controls, which are below the transparent part. I can activate them, but no info is shown.

(5) The mouse information is the opposite: the pixel colors are taken from the window at the bottom, the hands of the clock do not ever show up.

(6) After experimenting a little, the script crashed. Windows got in a funny state: The activate window (selected with AltTab, or the taskbar or clicking in a visible part) do not get in the foreground. I have to manually minimize foreground windows to get to the active one. It looks like some cleanup is necessary at the end of the script. Have you thought about OnExit? Killing the script from its tray icon could cause the same problems.
Back to top
View user's profile Send private message
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Sun Apr 16, 2006 11:08 pm    Post subject: Reply with quote

1) 2) and 6)
Quote:
;changes since 1.1
; - added: OnExit routine that clean up frame gui if script exits unexpectedly
; - changed: Tooltip of control frame disappears when mouse gets moved onto it.
; - changed: font size of GUI is now 6pt (the look of the GUI doesn't change on my system with this seeting)

3) no i never treid a freez button. I will keep it as it is.

4) and 5) I have no idea how to solve this. I only use normal AHK commands. So if they can't get the data, i doubt it would be of any use if Window info would get it (with DllCall or SendMessage).

Thanks for testing it and giving feedback

EDIT: updated first post with version 1.2
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Laszlo



Joined: 14 Feb 2005
Posts: 3943
Location: Pittsburgh

PostPosted: Mon Apr 17, 2006 1:04 am    Post subject: Reply with quote

OnExit needs a little more fine tuning. Try exiting the script from its tray icon. Alt-Tab will not bring the active window in the foreground. Restart the script and exit it from its GUI: Alt-Tab works fine. (Fonts and tooltips are perfect now on my laptop.)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group