Jump to content

How to read a listview that is dynamically updating


 Share

Recommended Posts

Hi there,

I'm using ControlListView("Title", "", "SysListView321", "GetText") to read items from a listview control in a window.

While one GetText command can only read one subitem, I have to use several ControlListView commands to get all subitems of an item in a same line.

But constantly and very quickly there are new items inserted to the top of the listview.

So between the two GetText commands the several lines at the top may changed.

And I read disordered information.

Could anyone help? Thx.

Link to comment
Share on other sites

Can you remember the number from the bottem. So it is always 3rd from the bottom. "GetItemCount" -3

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Link to comment
Share on other sites

Mass, thx for reply.

The problem is that between the GetItemCount and the next GetText command, the top line may be altered by a new inserted line.

Even I remember the number from the bottom, the number may be wrong when I read the subitem.

I need some method to read all the subitems as a whole.

Link to comment
Share on other sites

That is tough. If the listview changes between function calls within AutoIT there is not much you can do.

Your options depend on what your trying to achieve. You could log it and stort though it later or somehow try to get a snapshot.

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Link to comment
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
 Share

  • Recently Browsing   0 members

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