CoderAI Posted April 17, 2017 Share Posted April 17, 2017 Hello Everyone, This is my first post here. I am struggling with TreeView handling in my windows application. It is a .Net application. My problem is: The .Net application contains different sections and different tree structures in those sections. I have managed to go to each section but not able to identify the tree view. I have tried all possible command related to TreeView i.e. ControlTreeView, _GUICtrlTreeView_FindItem etc but nothing worked out. I read somewhere that .Net application needs to be managed in different way as in to integrate vbscript with AutoIt. I am not getting the solution. Please help. Thanks Link to comment Share on other sites More sharing options...
LarsJ Posted April 17, 2017 Share Posted April 17, 2017 CoderAI, Take a look at this post. Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
CoderAI Posted April 17, 2017 Author Share Posted April 17, 2017 Thanks @LarsJ I am not sure if I would be able to download Inspect.exe in my laptop. Is there any other way to handle it? Link to comment Share on other sites More sharing options...
CoderAI Posted April 19, 2017 Author Share Posted April 19, 2017 @LarsJ I have gone thru the link you provided and tried with one of your example #71 which provided me some details of my application. Few of them I'm pasting here: Title = Class = WindowsForms10.Window.8.app.0.2b89eaa_r19_ad1 Ctrl type = 50033 Ctrl name = pane Selected = False Handle = 000403BA Title = Class = WindowsForms10.Window.8.app.0.2b89eaa_r19_ad1 Ctrl type = 50033 Ctrl name = pane Selected = False Handle = 00040384 Title = Class = WindowsForms10.Window.8.app.0.2b89eaa_r19_ad1 Ctrl type = 50033 Ctrl name = pane Selected = False Handle = 00040398 Title = Class = WindowsForms10.Window.8.app.0.2b89eaa_r19_ad1 Ctrl type = 50033 Ctrl name = pane Selected = False Handle = 0004039A Title = Class = WindowsForms10.Window.8.app.0.2b89eaa_r19_ad1 Ctrl type = 50033 Ctrl name = pane Selected = False Handle = 00040390 Title = Test Cases Explorer Custom View Class = WindowsForms10.Window.8.app.0.2b89eaa_r19_ad1 Ctrl type = 50033 Ctrl name = pane Selected = False Handle = 0004038C I am looking for the Handle "Handle = 0004038C" (the highlighted one) which is a treeview in my application with common class name. I am not able to detect and control the treeview. Please help. Link to comment Share on other sites More sharing options...
LarsJ Posted April 19, 2017 Share Posted April 19, 2017 CoderAI, Well done. The control with the highlighted handle is a pane control (CUIAutomation2.au3: Global Const $UIA_PaneControlTypeId=50033) and is probably the parent control of the treeview. Please copy a bit more of the information in SciTE console (generated by the code in post 71 of the UI Automation thread) so that we in fact can see the treeview and some of the treeview items. In which way do you want to control or automate the treeview? Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
CoderAI Posted April 25, 2017 Author Share Posted April 25, 2017 I want to automate the treeview in the way that I could - apply the search for a text, - expand/collapse the nodes - naviagate up/down in tree. The SciTE console is attached here. TreeView.txt Link to comment Share on other sites More sharing options...
LarsJ Posted April 25, 2017 Share Posted April 25, 2017 TreeView.txt contains no information about the treeview. To be able to automate the treeview we simply need information. I've updated the code in post 71 so that it can start from the desktop. Sometimes this can provide more information. Please try running the updated script and start from the desktop (default in the script). Remember to close all windows except the treeview window. Otherwise, you get too much information. If it does not provide more information then look at this post once more. It's updated. Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now