Sign in to follow this  
Followers 0
TuMbLeWeEd

Window control grabber en tester

25 posts in this topic

#1 ·  Posted (edited)

EDIT 10/05/2005:Only use beta now

Version 0.2

See this post for details on whats fixed and added

EDIT 09/05/2005: Do not use the beta's if you dont use the exe for this as you don't have nothing more then Handle's int the window list :) , don't know if it's my code (checked with 3.1.1.20 & latest 25)

3.1.1 stable release works fine

Again somthing that is grown out of hand :(

A friend needed a process closed and the task manager was not working.

Messing arround i came to this

Posted Image

List all windows from a running process including all controls and controlID's so you can search for the best way to control your app's witout trial and error coding.

Just choose the exe in the process list (if dont know wat those exe's all are, there is a contextmenu google search for that :( ) the windows that are linked to that app will be listed so you can select one to list all controls for that window.

Hide, disable, show windows you have never seen ......

Playing with controls is nice but dont mess up your pc

Hope somone can use this as i forgot to sleep to night :

Process_window_contol_grabber_0.2.zip

Edited by TuMbLeWeEd

Share this post


Link to post
Share on other sites



Very interesting gui.

Good how it comes up with the info. Very well done. It does the googling very well. No errors to report, though, the balloons remain at the control, even when the gui is minimized. Had to shut it down, to get rid of it.

I do not like the always on top setting. It just hogs the desktop. Transparency does not seem suitable for it either.

Very cool app. :(

Share this post


Link to post
Share on other sites

Nice Job :(


[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

Hmm... Looks really neat! I just wish my processor wasn't so crappy, because transparency "lags" my computer... But I see you have a setting, so that's cool :( Good work :(


FootbaG

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Updated:See first post for file

Fixed bugs: :

- when the same app was twice in the process list or more, only first was used (check on List PID now)

-beta issue no window info in list, only beta now (used 3.1.1.25)

-Baloons go away on minimize

Redone: :)

-No more controlupdate on windowlistitem click: now use Get Controls in context menu (that was bugging me)

-Arranged the code a lot

-Retrieve more controls from window (was limited to controls with a ControlID)

-Should be faster also (somtimes)

-When no ControlID use ClassNameNN instead for controltests

New: ;)

-Sorted processlist (thats why i use the beta, note the StdinWrite func in the helpfile :P )

-More controls supported in contextmenu

-More window control (more to come)

Idea: :(

Write actions done to file (have some kind of scriptwriter then)

Dont know if can pull that of, can try it :(

Edited by TuMbLeWeEd

Share this post


Link to post
Share on other sites

This is a great tool -- good job on the layout and presentation as well.

I found a case where is it not showing the ControlID however. I've attached a screenshot showing the control grabber, my window and the Window Info tool.

You'll see that Window Info shows the control at the bottom of my application window highlighted and shows a ControlID of 59422. Control Grabber has the same control selected but the ControlID is blank both in the main window and in the balloon.

Also, and enhancement idea -- another tool I've used called StrokeIt (for mouse gestures) has a small bullseye graphic that you can drag and drop onto a control in an external app and it will retrieve the control information. Don't know if the AutoIt GUI provides everything needed to do that, but it would add greatly to speed of finding info on the desired control in a complex app.

Thanks again for the great work!

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

This is a great tool -- good job on the layout and presentation as well.

I found a case where is it not showing the ControlID however.  I've attached a screenshot showing the control grabber, my window and the Window Info tool. 

You'll see that Window Info shows the control at the bottom of my application window highlighted and shows a ControlID of 59422.  Control Grabber has the same control selected but the ControlID is blank both in the main window and in the balloon.

Also, and enhancement idea -- another tool I've used called StrokeIt (for mouse gestures) has a small bullseye graphic that you can drag and drop onto a control in an external app and it will retrieve the control information.  Don't know if the AutoIt GUI provides everything needed to do that, but it would add greatly to speed of finding info on the desired control in a complex app.

Thanks again for the great work!

Dale

<{POST_SNAPBACK}>

I know this

Is limited to 50000 first ControlID's, will be in the options in the next version (for now look in the Main_funcs.au3 for the 50000 value and up it, also in next line change the 500 values then, note that it will take longer as it will check all ControlID's)

If you have the script you can change this easely

Working on a new version wich has a lot more options and a newer GUI layout (Show hidden windows, Show disabled windows, action recorder, Autoget Active window controls, ....)

Your idea has come up to me also, working on this to (get the focused control info, keyboard focus is working now but also want to do the control under mouse)

Share this post


Link to post
Share on other sites

I know this

Is limited to 50000 first ControlID's, will be in the options in the next version (for now look in the Main_funcs.au3 for the 50000 value and up it, also in next line change the 500 values then, note that it will take longer as it will check all ControlID's)

If you have the script you can change this easely

<{POST_SNAPBACK}>

Hmmm... I upped the counter to 1,000,000 recompiled and ran and no change (I also added a msgbox to confirm it had my code change). Any other thoughts?

For $x = 1 to 1000000
                if IsInt($x/10000) then GUICtrlSetData($control_progress,$x/10000)
                $handle = ControlGetHandle ( $HWND, "", $x )
                if $handle <> "" Then
                    $controlsnr = $controlsnr + 1
                    GUICtrlSetData($control_progress,$x/10000)
                    ControlFocus ( $HWND, "", $x )
                    $tmp = String(ControlGetHandle ( $HWND, "", $x ))
                    For $y = 1 To $status
                        if $tmp = $Classlist[$y] Then
                            GUICtrlSetData($ItemsArray[$y],"|" & $x) 
                            ExitLoop
                        EndIf
                    Next
                ;$controlpos = ControlGetPos ( $HWND, "", $x )
                ;$items = GUICtrlCreateListViewItem(ControlGetFocus ( $HWND ) & "|" & $x & "|" & String(ControlGetHandle ( $HWND, "", $x )) & "|" & ControlGetText ( $HWND, "", $x ) & "|" & $controlpos[0] & "|" & $controlpos[1] & "|" & $controlpos[2] & "|" & $controlpos[3] & "|" & ControlCommand ( $HWND, "", $x, "IsVisible", "" )& "|" & ControlCommand ( $HWND, "", $x, "IsEnabled", "" ),$winControl_List)
                    if $controlsnr = $status then ExitLoop 2
                EndIf
            Next

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

No prob with my newer version on my pc (downloaded the viewer app to test it)

It shows nicely the ControlID (Nice to see that an empty app window has that many controls, had to check "show hidden controls" and "show controlID's")

Try the newer one and let me know

Note: it autogets the activewindow controls, no option to set it off now

DONT FORGET TO CHECK "show controlID's" other wise it skips the search (much faster)

Not all functions have the recording mode supported now (if a command fails it will not get in the recorded as its all still buggy, dont trus that option to much)

Let me know if it works for you

Edited by TuMbLeWeEd

Share this post


Link to post
Share on other sites

No prob with my newer version on my pc (downloaded the viewer app to test it)

It shows nicely the ControlID (Nice to see that an empty app window has that many controls, had to check "show hidden controls" and "show controlID's")

Try the newer one and let me know

<{POST_SNAPBACK}>

Thanks. I downloaded and ran the new window_controls.exe from your previous post. I made certain that 'Search Children' and 'Search ControlIDs' were both checked (actually I tried checking everything except Disable Balloons before I was done). Unfortunately it still does not display the ControlID.

I'm happy to continue to help test if you want to do it here or via PM.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

Thanks.  I downloaded and ran the new window_controls.exe from your previous post.  I made certain that 'Search Children' and 'Search ControlIDs' were both checked (actually I tried checking everything except Disable Balloons before I was done).  Unfortunately it still does not display the ControlID.

I'm happy to continue to help test if you want to do it here or via PM.

Dale

<{POST_SNAPBACK}>

Thanks, :(

Will send it to you by Mail, so you can test it if have somthing thats ok to me

Share this post


Link to post
Share on other sites

This is a really exellent tool, thank-you very much for your efforts.

I do have a question. There are some controls I can't get any information on. Specifically, I am trying to get text information from listview control from a poker application. The application is PokerStars.

Download PokerStars

When try to get text in a listview, the return is blank. Does anyone know why and how I might go about getting this information?

Radsam

Share this post


Link to post
Share on other sites

This is a really exellent tool, thank-you very much for your efforts.

I do have a question. There are some controls I can't get any information on. Specifically, I am trying to get text information from listview control from a poker application. The application is PokerStars.

Download PokerStars

When try to get text in a listview, the return is blank. Does anyone know why and how I might go about getting this information?

Radsam

<{POST_SNAPBACK}>

I checked the app out, it has those nasty "Afx:400000 ...." ClassNameNN names (not controlable with the listview commands)

Thats the whole reason why i'm making this tool (note finished, so don't kill me :( )

It's made with AutoIt, so if the tool cant get the text you can't get the text with AutoIt

This is intended to make it easy for you: try controling the destination app with this tool

If it does not work in this tool, it should not be possible to do it without pure mouseclick (you dont have to spend hours figuring out and manualy write the code to test it)

Working on the tool now, AutoIt has a lot of functions so a lot of work ahead

Have some nice tings working like:

-autoget active window info, controls and refreshing when changed

-hover over control and show a tooltip with the info autocopied to the cipboard (not perfect for the moment, not working for controls initialy located outside the window)

Working on:

-doubble controlID's, i have noticed some stuff about that=>i do not get them (maybe i dont want them in there because i have noticed in some comboboxes=>the edit controls located in the combo is in fact some kind of child control of that combo and is not controlable with the controlID=>so not usable in AutoIt)

Try to make some kind off IsChild from function

-Try to use HWND handles in recordings (do not have to change you Auto installer when changing appversions in the title)

-drag and drop spot for multiple file paths replacing standard paths using the @filepath macro's

ToDo:

-A Lot off AutoIt functions=>Have to finish the above as it will avoid me to rewrite or update a lot off functions

-Auto record (no maual command handling)

-Try to make DllCall functions for some controls wich will be Auto Included in recordings

-.....

Share this post


Link to post
Share on other sites

How can I get Afx:400000 control text if I can't use AutoIt?

Share this post


Link to post
Share on other sites

How can I get Afx:400000 control text if I can't use AutoIt?

<{POST_SNAPBACK}>

Dont think it's possible inAutoIt or you must make a screen reader

You have to be very inventive to check visible text

Have some nasty idea with some sort off screen reader (that is checking pixels)

the idea is that you create some kind off ref points for a letter: example

Take the capital letter "F", the refpoint to start with is the left bottom of the letter witch will be say:

xpoint = 54 and ypoint = 50 and the fontcolor is black and fontsize 9 for the font used

You know that the pixels between:

xpoint/ypoint to xpoint/ypoint - 9 must be black

xpoint/ypoint -9 to xpoint + 4/ypoint - 9 must be black

xpoint/ypoint -5 to xpoint + 3/ypoint - 5 must be black

Thats only tree rules it has to comply to for the cappitle "F"

Note that visualy the closesd to "F" = "P" and it will fail on the second rule because xpoint + 4/ypoint - 9 is not black

Note that it wil be very slow

Share this post


Link to post
Share on other sites

CyberSlug made a 'screen reader' I think. Its late and I can't be bothered searching but its definately around.


[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

For anyone whos interested I found it. I'm adding a new reply instead of 'Editing' because I think this topic is like on the second page.

http://www.autoitscript.com/forum/index.ph...10891&hl=screen

Start from the first post and read your way to the end.


[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

This is a neat tool, TuMbLeWeEd!

I personally liked the first release, but the new GUI is neat as well, and I like the added functionality.

One thing I'd like to suggest, you might want to set the Transparency slider to go from 5% to 100%, or something so it doesn't drop to 0% ever. It seems when I put the slider all the way down, the window disappears. I don't mean it's completely transparent, I mean I click where the window should be (to drag the slider back to visible), and it selects the desktop, or whatever window should be *behind* your app.

Thanks again :(

Share this post


Link to post
Share on other sites

This is a neat tool, TuMbLeWeEd!

I personally liked the first release, but the new GUI is neat as well, and I like the added functionality.

One thing I'd like to suggest, you might want to set the Transparency slider to go from 5% to 100%, or something so it doesn't drop to 0% ever.  It seems when I put the slider all the way down, the window disappears.  I don't mean it's completely transparent, I mean I click where the window should be (to drag the slider back to visible), and it selects the desktop, or whatever window should be *behind* your app.

Thanks again :(

<{POST_SNAPBACK}>

Noticed it to, there wil be a newer version soon where its limited to 80 (just stays visible on my pc then)

All settings wil be saved then (you dont want the 0 visibility then)

Share this post


Link to post
Share on other sites

awesome :(

I LOVE the google search option!

I don't know if anyone else thinks this or just me, but in the option to open a new application, I personally prefer to use "Run" like Task Manager does.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0