sJoe Posted November 23, 2008 Share Posted November 23, 2008 Hey there, I have spent a few hours searching the forums and the web as well as playing around with ControlGetText and have been unable to even get the first part of my project started. I am looking to read the text of list items in a ListBox object of an application. I have used automate to browse the list so I know the data is there and not hidden or in a custom class. I have access to the window class, object class and ID. My end goal is to be able to read the content in the list in real time so I can execute certain actions when items appear in the list. Is there an existing function or script that allows me to extract the entire list and parse it or loop through a list and read items one at time? Either will suffice. Thanks in Advance, Joe Link to comment Share on other sites More sharing options...
Zedna Posted November 23, 2008 Share Posted November 23, 2008 Look at ControlCommand() Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
sJoe Posted November 23, 2008 Author Share Posted November 23, 2008 Look at ControlCommand()Hey Zedna,I just looked at the commands available to ControlCommand() as I interpret the options it does not seem I can read the text from the list box unless the item is selected. The list box I am trying to read from is constantly being updated with new entries. I am trying to read the content of the the entire box or at least the last 10 items in it. Is that possible with an option available to ControlCommand() ?Thanks,Joe Link to comment Share on other sites More sharing options...
Zedna Posted November 23, 2008 Share Posted November 23, 2008 Then look at: #include <GUIListBox.au3> ControlGetHandle() _GUICtrlListBox_GetCount() _GUICtrlListBox_GetText() Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
sJoe Posted November 23, 2008 Author Share Posted November 23, 2008 Then look at:#include <GUIListBox.au3>ControlGetHandle()_GUICtrlListBox_GetCount()_GUICtrlListBox_GetText()Hey Zedna,That is EXACTLY what I was looking for =) It works perfect! Thanks a ton -Joe Link to comment Share on other sites More sharing options...
sJoe Posted November 26, 2008 Author Share Posted November 26, 2008 (edited) Ok, new issue: [uPDATE] I've done a bit more digging and determined the entries in the list box may be in some sort of array data container or another data type. Any thoughts on how to go about getting that data out, at least in its raw format, so I can attempt to sort it for my use? [/uPDATE] When I try to obtain text from a listbox that has multiple columns it just returns 1 as the text. There are 8 columns in this particular ListBox. Other functions like _GUICtrlListBox_GetCount work fine and return the right count so I know I am talking to the right control. Also, if return the text without processing it using the DLLStructGetData($struct, "Text") aspect of GuiListBox.au3 it returns "4" if that means anything to anyone. Thanks, once again, in advanced - Joe Edited November 26, 2008 by sJoe Link to comment Share on other sites More sharing options...
Zedna Posted November 26, 2008 Share Posted November 26, 2008 Are you sure it's ListBox? ListBoxes usualy don't have more columns (it can be achieved by @TAB character though). For more columns is obviously used ListView control instead. Use Au3Info tool to get ClassName of your target control. And post screenshot of it. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
sJoe Posted November 26, 2008 Author Share Posted November 26, 2008 Are you sure it's ListBox? ListBoxes usualy don't have more columns (it can be achieved by @TAB character though). For more columns is obviously used ListView control instead. Use Au3Info tool to get ClassName of your target control. And post screenshot of it. Here is the information from the summary page: Window: Class: TfrmMain.UnicodeClass Control: TTntListBox.UnicodeClass Advanced(Class): [CLASS: TTntListBox.UnicodeClass] Text: Nothing in Visible / Hidden Text. -- I currently have a portion of my application working with other list box in the same program they are single column only however. They also have the same class name. - Joe Link to comment Share on other sites More sharing options...
Zedna Posted November 26, 2008 Share Posted November 26, 2008 TTntListBox.UnicodeClass seems to be custom (not standard) control. With AutoIt you can work only with standard Windows controls. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
DIMM_V2 Posted December 2, 2023 Share Posted December 2, 2023 maybe some UDF can handle this class " TfrmMain.UnicodeClass" ? for the moment only two methods are avaible : 1 - click by images 2 - click by mouse coords. Link to comment Share on other sites More sharing options...
Developers Jos Posted December 2, 2023 Developers Share Posted December 2, 2023 (edited) @DIMM_V2, did you see the dates of the posts in this thread? There is really no need to reply to old threads, so please don't! Edited December 2, 2023 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
DIMM_V2 Posted December 2, 2023 Share Posted December 2, 2023 1 minute ago, Jos said: @DIMM_V2, did you see the dates of the posts in this thread? There is really no need to reply to old threads, so please don't! nope you are wrong , since the date there many new kinds of UDF's,so maybe it is possible, and i have the same problem , so i will search for the solution . Link to comment Share on other sites More sharing options...
Developers Jos Posted December 2, 2023 Developers Share Posted December 2, 2023 For clarity: i am not wrong! This topic is 15 years old so do not resurrect old threads like this... Full stop!!!! *click* SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts