FireLordZi Posted February 4, 2008 Author Posted February 4, 2008 because you aren't changing where it is setting. I just realized the problem is because I set the index to 0!!! I'm so stupid! $dateitems = _GUICtrlListViewSetItemText($nListview, 0, 2, $date_); Sets the date from the INI file While Alive() { DrinkWine(); }AutoIt Programmer
Thatsgreat2345 Posted February 4, 2008 Posted February 4, 2008 #include <GuiConstantsEx.au3> #include <GuiListView.au3> Global $readsection $hGui = GuiCReate("Test", 300, 200) $hListView = _GUICtrlListView_Create($hGui, "Items|SubItems", 10, 10, 280, 180, -1, $WS_EX_CLIENTEDGE) $readsection = IniReadSection("C:\buddies.ini", "OnlineBuddies") If IsArray($readsection) Then For $i = 1 To $readsection[0][0] $item = StringRegExp($readsection[$i][1], "~?(\d{1,}-\d{1,}-\d{1,})", 1) _GUICtrlListView_AddItem($hListView, $item[0]) Next EndIf GUISetState() Do Until GUIGetMsg() = -3 I just realized the problem is because I set the index to 0!!! I'm so stupid! $dateitems = _GUICtrlListViewSetItemText($nListview, 0, 2, $date_); Sets the date from the INI file To avoid confusing FireLord any more I do not believe stringreg would be the best idea. But I already suggested not using setItemText and use guictrlcreatelistviewItem
FireLordZi Posted February 4, 2008 Author Posted February 4, 2008 The problem I had before was it was setting the date in the first item, and I figured out it was because I had the index set to 0 on the _GUICtrlListViewSetItemText() line. Now I have it to $z and it is only setting it to the second item. What's the problem? $readsection = IniReadSection("C:\buddies.ini", "OnlineBuddies") If IsArray($readsection) Then For $z = 1 To $readsection[0][0] MsgBox(0, "", 'Key: ' & $readsection[$z][0] & @CRLF & 'Value: ' & $readsection[$z][1]) $var0 = StringSplit($readsection[$z][1], "~") $var1 = StringSplit($readsection[$z][1], ";") $date_ = StringTrimLeft($var1[UBound($var1)-1], 1) $dateitems = _GUICtrlListViewSetItemText($nListview, $z, 2, $date_); Sets the date from the INI file Next EndIf While Alive() { DrinkWine(); }AutoIt Programmer
FireLordZi Posted February 4, 2008 Author Posted February 4, 2008 any ideas? While Alive() { DrinkWine(); }AutoIt Programmer
FireLordZi Posted February 5, 2008 Author Posted February 5, 2008 bump While Alive() { DrinkWine(); }AutoIt Programmer
Thatsgreat2345 Posted February 5, 2008 Posted February 5, 2008 bumpHave you even looked at _GUICtrlListView_SetItemText in the help file?
FireLordZi Posted February 5, 2008 Author Posted February 5, 2008 Have you even looked at _GUICtrlListView_SetItemText in the help file?Yes, is there some point your trying to make?? While Alive() { DrinkWine(); }AutoIt Programmer
FireLordZi Posted February 5, 2008 Author Posted February 5, 2008 No one has any suggestions?... While Alive() { DrinkWine(); }AutoIt Programmer
Thatsgreat2345 Posted February 5, 2008 Posted February 5, 2008 Yes, is there some point your trying to make?? Look at the help file... Look at how the parameters are... look at yours....
FireLordZi Posted February 5, 2008 Author Posted February 5, 2008 (edited) Look at the help file... Look at how the parameters are... look at yours....Mine are fine? Edit: Don't forget that I have an older version so they probably changed the format...My version:_GUICtrlListViewSetItemText ( $h_listview, $i_index, $i_subitem, $s_text ) Edited February 5, 2008 by FireLordZi While Alive() { DrinkWine(); }AutoIt Programmer
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