jigne Posted April 21, 2010 Share Posted April 21, 2010 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 More sharing options...
bo8ster Posted April 21, 2010 Share Posted April 21, 2010 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 More sharing options...
jigne Posted April 21, 2010 Author Share Posted April 21, 2010 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 More sharing options...
jigne Posted April 23, 2010 Author Share Posted April 23, 2010 Somebody know? Link to comment Share on other sites More sharing options...
bo8ster Posted April 23, 2010 Share Posted April 23, 2010 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 More sharing options...
picaxe Posted April 23, 2010 Share Posted April 23, 2010 If you can get the listview handle, then _GUICtrlListView_GetItemTextString can do it. Link to comment Share on other sites More sharing options...
Tvern Posted April 23, 2010 Share Posted April 23, 2010 or _GUICtrlListView_BeginUpdate() -> read data -> _GUICtrlListView_EndUpdate(), but I'm not sure if these functions work on listviews in other programs. 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