pacoxxl Posted October 3, 2006 Share Posted October 3, 2006 _GUICtrlListViewGetItemText($h_listview[, $i_Item=-1[, $i_SubItem=-1]]) _GUICtrlListViewGetItemText($h_listview, -1, 0) ... this is O.K. returned text from zero position from current selected row _GUICtrlListViewGetItemText($h_listview, -1, 1) ... this is NOT O.K. If $i_SubItem is non zero this function "" returned [font="Courier New"][center]PACOxxl[/center][/font] Link to comment Share on other sites More sharing options...
GaryFrost Posted October 3, 2006 Share Posted October 3, 2006 (edited) _GUICtrlListViewGetItemText($h_listview[, $i_Item=-1[, $i_SubItem=-1]]) _GUICtrlListViewGetItemText($h_listview, -1, 0) ... this is O.K. returned text from zero position from current selected row _GUICtrlListViewGetItemText($h_listview, -1, 1) ... this is NOT O.K. If $i_SubItem is non zero this function "" returned That suggests an error occured, would help to see a script to reproduce this. Edited October 3, 2006 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
pacoxxl Posted October 3, 2006 Author Share Posted October 3, 2006 That suggests an error occured, would help to see a script to reproduce this.This is modified example from HelpFile:#include <GuiConstants.au3>#include <GuiListView.au3> Opt ('MustDeclareVars', 1)Dim $listview, $Btn_Get, $Btn_GetSelected, $Btn_Exit, $msg, $Status, $retGUICreate("ListView Get Item Text", 392, 322)$listview = GUICtrlCreateListView("col1|col2|col3", 40, 30, 310, 149)GUICtrlCreateListViewItem("line1|data1|more1", $listview)GUICtrlCreateListViewItem("line2|data2|more2", $listview)GUICtrlCreateListViewItem("line3|data3|more3", $listview)GUICtrlCreateListViewItem("line4|data4|more4", $listview)GUICtrlCreateListViewItem("line5|data5|more5", $listview)$Btn_GetSelected = GUICtrlCreateButton("Get Selected", 200, 200, 90, 40)$Btn_Exit = GUICtrlCreateButton("Exit", 300, 260, 70, 30)$Status = GUICtrlCreateLabel("", 0, 302, 392, 20, BitOR($SS_SUNKEN, $SS_CENTER))GUISetState()While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $Btn_Exit ExitLoop Case $msg = $Btn_GetSelected GUICtrlSetData($Status, "") $ret = _GUICtrlListViewGetItemText ($listview) If ($ret <> $LV_ERR) Then MsgBox(0, "Selected Item", $ret) $ret = _GUICtrlListViewGetItemText ($listview, -1, 2) If ($ret <> $LV_ERR) Then MsgBox(0, "Selected Item, SubItem 0", $ret) EndIf Else GUICtrlSetData($Status, "Nothing Selected") EndIf EndSelectWEndExit [font="Courier New"][center]PACOxxl[/center][/font] Link to comment Share on other sites More sharing options...
GaryFrost Posted October 3, 2006 Share Posted October 3, 2006 Works fine for me, in both 3.2.0.1 and 3.2.1.5 SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
pacoxxl Posted October 3, 2006 Author Share Posted October 3, 2006 Works fine for me, in both 3.2.0.1 and 3.2.1.5hmm...for me works until 3.2.1.4 [font="Courier New"][center]PACOxxl[/center][/font] Link to comment Share on other sites More sharing options...
pacoxxl Posted October 10, 2006 Author Share Posted October 10, 2006 Works fine for me, in both 3.2.0.1 and 3.2.1.53.2.1.5 - first use function _GUICtrlListViewGetView with LVM_GETVIEW messageGuiListView.au3#row#602 If _GUICtrlListViewGetView($h_listview) <> $LVS_REPORT Then $count = 1MINIMUM operating system for LVM_GETVIEW message is WindowsXP... http://windowssdk.msdn.microsoft.com/en-us...y/ms670785.aspxI have Win2000 (Win98SE) [font="Courier New"][center]PACOxxl[/center][/font] Link to comment Share on other sites More sharing options...
GaryFrost Posted October 10, 2006 Share Posted October 10, 2006 3.2.1.5 - first use function _GUICtrlListViewGetView with LVM_GETVIEW message GuiListView.au3#row#602 If _GUICtrlListViewGetView($h_listview) <> $LVS_REPORT Then $count = 1 MINIMUM operating system for LVM_GETVIEW message is WindowsXP... http://windowssdk.msdn.microsoft.com/en-us...y/ms670785.aspx I have Win2000 (Win98SE) replace the if statement with If Not $count Then $count = 1 that should fix it, i have to check to make sure it doesn't break what the other if statement was fixing SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. 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