Piyush Posted July 4, 2009 Share Posted July 4, 2009 how to know the zero based index of the item if there are many items in the list and one more question , i want to my script to every time when it is opened read items and subitems from a file how can i do this [font="Comic Sans MS"][size="7"]Piyush.....[/size][/font][font="Palatino Linotype"][size="2"]Some Of My Scripts...Cool Font Generator Train Searcher and Tracer[/size][/font] Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 5, 2009 Share Posted July 5, 2009 how to know the zero based index of the item if there are many items in the listDo you mean to search for the item, or how to know the index of the last item added, or...what? If you add the subitems directly after you add the item, _GUICtrlListView_AddItem() returns the index of the new item, which can be used for the subitems: ; Add items with 3 columns For $n = 0 To 5 $iIndex = _GUICtrlListView_AddItem($hListView, "Item " & $n & " Col 1", 0) _GUICtrlListView_AddSubItem($hListView, $iIndex, "Item " & $n & " Col 2", 1) _GUICtrlListView_AddSubItem($hListView, $iIndex, "Item " & $n & " Col 3", 2) Next If that's not what you meant, be more specific. and one more question , i want to my script to every time when it is opened read items and subitems from a file how can i do thisLook at the INI* functions in the help file. If you want more complexity, try eltorro's XMLDomWrapper.au3 UDF and do it with an XML. 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...
Piyush Posted July 6, 2009 Author Share Posted July 6, 2009 Do you mean to search for the item, or how to know the index of the last item added, or...what? If you add the subitems directly after you add the item, _GUICtrlListView_AddItem() returns the index of the new item, which can be used for the subitems: ; Add items with 3 columns For $n = 0 To 5 $iIndex = _GUICtrlListView_AddItem($hListView, "Item " & $n & " Col 1", 0) _GUICtrlListView_AddSubItem($hListView, $iIndex, "Item " & $n & " Col 2", 1) _GUICtrlListView_AddSubItem($hListView, $iIndex, "Item " & $n & " Col 3", 2) Next If that's not what you meant, be more specific. Look at the INI* functions in the help file. If you want more complexity, try eltorro's XMLDomWrapper.au3 UDF and do it with an XML. thanks for help i was waiting for it. i got it what i wanted to do with your example i just did not knew that _guictrllistview_additem returns the index number. i just wanted the index number of the item i have added. i big thanks to you... [font="Comic Sans MS"][size="7"]Piyush.....[/size][/font][font="Palatino Linotype"][size="2"]Some Of My Scripts...Cool Font Generator Train Searcher and Tracer[/size][/font] 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