How to get rows from SysListView32 using ControlListView()?

350 Views Asked by At

My code to select the SysListView32 is working fine:

string text = strings.au3.ControlListView(strings.TerminalName, "", "SysListView321", "SelectAll","","");
string text2 = strings.au3.ControlListView(strings.TerminalName, "", "SysListView322", "SelectAll", "", "");

I want to get the rows of the SysListView32. I tried GetText but it is always returning 0.

string Aaasa = strings.au3.ControlListView(strings.TerminalName, "", "SysListView321", "GetText", "", "");
string Aaasa = strings.au3.ControlListView(strings.TerminalName, "", "SysListView322", "GetText", "", ""); 

Is there any way I can use AutoIt to get all the rows (Ex-the last tradetime, %change, volume, symbol). I need to fetch data from the 2 lists in the application simultaneously every second.

1

There are 1 best solutions below

2
On

from AutoItX.chm

"GetText", Item, SubItem

Returns the text of a given item/subitem.

string Aaasa = strings.au3.ControlListView(strings.TerminalName, "", "SysListView321", "GetText", 0, 0);
string Aaasa = strings.au3.ControlListView(strings.TerminalName, "", "SysListView322", "GetText", 1, 0); 

You should provide integeres not string as a 5th and 6th parameters

After comment I think it should look like:

string Aaasa = strings.au3.ControlListView(strings.TerminalName, "", "SysListView321", "GetText", "0", "0");
string Aaasa = strings.au3.ControlListView(strings.TerminalName, "", "SysListView322", "GetText", "1", "0");