Jump to content

Interesting ListView problem/bug?


Recommended Posts

I recently (finally) upgraded my version of AutoIt from 3.2.0.0 to the latest 3.2.10.0.

My problem is with the ControlListView function. My code is as follows:

Func AppliedListView()
        Local $wndTitle = ": "
        Local $wndText = ""
        Local $ctrlList = "ListView20WndClass1"

        $row = ControlListView($wndTitle, $wndText, $ctrlList , "GetItemCount")
        $col = ControlListView($wndTitle, $wndText, $ctrlList , "GetSubItemCount")
        Dim $aList[$row+1][$col+1]

        For $i = 0 To $row
            For $j = 0 To $col 
                $aList[$i][$j] = ControlListView($wndTitle, $wndText, $ctrlList , "GetText", $i, $j)
            Next
        Next
        Return $aList
    EndFunc

The problem is both the following calls work,

ControlListView($wndTitle, $wndText, $list, "GetItemCount")

ControlListView($wndTitle, $wndText, $list, "GetSubItemCount")

however, this does not work with version 3.2.10.0, yet it does with version 3.2.0.0

ControlListView($wndTitle, $wndText, $list, "GetText", $i, $j)

Is there any known bugs I'm not seeing with the new version, or any workarounds?

Thanks much,

Chad

Link to comment
Share on other sites

I don't know why that wouldn't work for you, but here is a demo of equivalent functions in the new GuiListView.au3 UDF:

$hList = ControlGetHandle($wndTitle, $wndText, $list)
$iRows = _GUICtrlListView_GetItemCount($hList)
$iCols = _GUICtrlListView_GetColumnCount($hList)
For $i = 0 To $iRows - 1
    For $j = 0 To $iCols - 1
        $sText = _GUICtrlListView_GetItemText($hList, $i, $j)
        ConsoleWrite("Debug: ListView [" & $i & "][" & $j & "] = " & $sText & @LF)
    Next
Next

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...