GWagner Posted July 2, 2012 Posted July 2, 2012 I am attempting to automate the execution of a Windows application with a difficult user interface to automate. Basically, this application will present a list of names with check boxes next to them that I can click on to select them. This is not a static list of names, and there is no ability to search for a name by sending the keystrokes. I am able to click on the top value and use the arrow down to go through each potential user/value. If I could read the text that is in the control under my cursor, I could cycle through all the potential users, and send a space keystroke to select that user. The key is reading the text under my cursor. Does anyone in the community know if it is possible to get the value of the text under the current location of the cursor, assuming the app is using a grid control (I think it is)? Thanks! --George
jdelaney Posted July 2, 2012 Posted July 2, 2012 (edited) In the start menu, use the AutoIT Window Info tool, and drag the corsair onto one of the names...then move over to the last tab of the app, grab all that data, and post it back to us...make sure to remove sensitive information...you can manipulate, loop, based on the control type. Edited July 2, 2012 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
GWagner Posted July 2, 2012 Author Posted July 2, 2012 There are actually two different windows where I would like to try to do this. Each summary is shown below. I was not able to get the Window Tool to display any of the text I am looking for... thank you for the quick response!Window #1>>>> Window <<<<Title: Add CasesClass: TForm_AddEntityPosition: 423, 283Size: 434, 259Style: 0x16CC0000ExStyle: 0x00010100Handle: 0x00190BEC>>>> Control <<<<Class: TListViewInstance: 1ClassnameNN: TListView1Name: Advanced (Class): [CLASS:TListView; INSTANCE:1]ID: 4266170Text: Position: 8, 27Size: 402, 157ControlClick Coords: 117, 60Style: 0x5601C045ExStyle: 0x00000200Handle: 0x004118BA>>>> Mouse <<<<Position: 556, 400Cursor ID: 0Color: 0xFFFFFF>>>> StatusBar <<<<>>>> ToolsBar <<<<>>>> Visible Text <<<<&Select AllCancelOK>>>> Hidden Text <<<<Window #2>>>> Window <<<<Title: Name of Admin Application (http://blah/blah/blah.svc)Class: TForm_MainPosition: 100, 100Size: 1080, 625Style: 0x16CF0000ExStyle: 0x00050100Handle: 0x0041064A>>>> Control <<<<Class: TcsListViewInstance: 1ClassnameNN: TcsListView1Name: Advanced (Class): [CLASS:TcsListView; INSTANCE:1]ID: 2888990Text: Position: 214, 51Size: 850, 516ControlClick Coords: 53, 224Style: 0x5601104DExStyle: 0x00000200Handle: 0x002C151E>>>> Mouse <<<<Position: 375, 405Cursor ID: 0Color: 0x5EA7EA>>>> StatusBar <<<<>>>> ToolsBar <<<<>>>> Visible Text <<<<Main MenuStandardApp Server (http://blah/blah/blah.svc)>>>> Hidden Text <<<<SQL Servers
jdelaney Posted July 2, 2012 Posted July 2, 2012 (edited) try this...replace the actual title in the wingethandle: If this returns > 0, then you can easily loop through: (note, have the window running)...this is for window 1 #include <GuiListView.au3> $hwndWindow = WinGetHandle ( "your title" ) $hwndListView = ControlGetHandle ( $hwndWindow, "", "[CLASS:TListView; INSTANCE:1]" ) msgbox ( 4096, "test count", _GUICtrlListView_GetItemCount ($hwndListView) ) Edited July 2, 2012 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
GWagner Posted July 6, 2012 Author Posted July 6, 2012 The problem is that the window is in two parts, the left side looks like an embedded tree control, and on the other side of a slider is the content I am looking to traverse. If I select either side with the Window tool, I think I am getting the same control even though only the panel I care about appears selected. I DO get a value > 0 but it matches the number of items in the tree on the left, not the entries on the right.
GEOSoft Posted July 6, 2012 Posted July 6, 2012 You are going to have a problem with this. I see several indications of that app being written in Delphi and Delphi windows are notoriously difficult to automate. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
GWagner Posted July 6, 2012 Author Posted July 6, 2012 I am pretty sure you are right about the app being based on Delphi. Am I totally out of luck?
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