DenDuze Posted December 13, 2010 Share Posted December 13, 2010 I'm trying to create a script to automate a process. Here I have to use a existing screen from our softwarevendor. In that screen there is a listview of the [CLASS:ListView20WndClass; INSTANCE:1] Now some commands from AutoIt do work with this listview example: when I use the select,the getitemcount, the getsubitemcount of the controlListView => I get the right result when I use the Gettext of teh controllistview => I don't get a result (I get a blank result) I've also tried the controlcommand with no success I there anywhone you used a script with the CLASS:ListView20WndClass? How did you get the text of the items in that list? What can I try to get the text of all the items in that list? Regards Didier Link to comment Share on other sites More sharing options...
funkey Posted December 13, 2010 Share Posted December 13, 2010 Did you try this? _GUICtrlListView_GetItemText _GUICtrlListView_GetItemTextArray _GUICtrlListView_GetItemTextString Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
DenDuze Posted December 15, 2010 Author Share Posted December 15, 2010 No I didn't I'm new to AutoIt so I have to use the help-file for finding solutions to my problems. I can't find those functions in the autoit.chm O now I see it, I have to read the UDFs3.chm Thanks I will take a look at that Link to comment Share on other sites More sharing options...
DenDuze Posted December 15, 2010 Author Share Posted December 15, 2010 Are the handles that you must use for the UDF's (hwnd) the same handles that you get as a result from the WinGetHandle function? I tried to use the UDF's _GUICtrlListView_GetItemText _GUICtrlListView_GetItemTextArray _GUICtrlListView_GetItemTextString but with no result! The strange thing is that when I use the controlListView with getItemCount or with getSelectedCount or with Select it all works but when I use getText (with or without subItem) I don't get a result? Is there anyone who knows what can be the reason for that (and why the UDF's _GUICtrlListView also don't work or give me a error so that I can find out what's wrong) I really want to use those UDF's because you can do interesting stuff with those. Link to comment Share on other sites More sharing options...
DenDuze Posted December 16, 2010 Author Share Posted December 16, 2010 Is there nobody that has got the same problem or knows a solution? Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 16, 2010 Share Posted December 16, 2010 As Deathbringer said, the window and control handles are the same variable type, but not the same value. You want something like this: #include <GuiListView.au3> ; ... $hWindow = WinGetHandle("Your Window Title", "Maybe some window text") $hListView = ControlGetHandle($hWindow, "", "[CLASS:ListView20WndClass; INSTANCE:1]") $iItemCnt = _GUICtrlListView_GetItemCount($hListView) $iColCnt = _GUICtrlListView_GetColumnCount($hListView) For $i = 0 To $iItemCnt - 1 ConsoleWrite("Item: " & $i & @LF) For $c = 0 To $iColCnt - 1 $sText = _GUICtrlListView_GetItemText($hListView, $i, $c) ConsoleWrite(@TAB & "Col: " & $c & " = " & $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 More sharing options...
DenDuze Posted December 17, 2010 Author Share Posted December 17, 2010 Thanks for the input! It works now. How simple things can be 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