11-24-2016, 06:32 AM
We are automating a Small Talk application and trying to launch a window by clicking an item from a WinList. Unfortunately, it is not activating the item we are expected to to launch. Is there another way to know the index of the item we need to double click or activate?
Item List Count: 13
Index of item to select (zero-based index): 11
Actual index selected: 5
Code snippet:
ItemListCount = Window("window").WinList("list").GetItemsCount
For i = 0 To ItemListCount - 1
Text = Window("window").WinList("list").GetItem(i)
If Strcomp(Text, "Templates") = 0 Then
Window("window").WinList("list").Activate i
Exit For
End if
Next
Item List Count: 13
Index of item to select (zero-based index): 11
Actual index selected: 5
Code snippet:
ItemListCount = Window("window").WinList("list").GetItemsCount
For i = 0 To ItemListCount - 1
Text = Window("window").WinList("list").GetItem(i)
If Strcomp(Text, "Templates") = 0 Then
Window("window").WinList("list").Activate i
Exit For
End if
Next