Jump to content

Reading text from a list object in another window


sJoe
 Share

Recommended Posts

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

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

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 by sJoe
Link to comment
Share on other sites

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

  • 15 years later...
  • Developers

@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 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

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

  • Developers

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

  • Jos locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...