Gif Posted May 23, 2007 Share Posted May 23, 2007 (edited) $sonw = @DesktopCommonDir &"\oniksodll.ini" $ones = IniWriteSection($sonw, "sectionnote", GUICtrlRead($onsetnamek)) $twos = IniWriteSection($sonw, "sectionnote2", GUICtrlRead($onsetplacek)) $threes = IniWriteSection($sonw, "sectionnote3", GUICtrlRead($date)) $fours = IniWriteSection($sonw, "sectionnote4", GUICtrlRead($time)) $fives = IniWriteSection($sonw, "sectionnote5", GUICtrlRead($notingonk)) $item1 = GuiCtrlCreateListViewItem(IniReadSection($sonw, $ones), $mainonset) GUISetState(@SW_HIDE, $kongui) i am pretty sure it has a lot of mistakes but INI is just not my best part of autoit so i need help.... (i am not familiar with INIs) Edited May 23, 2007 by c4nm7 Link to comment Share on other sites More sharing options...
theguy0000 Posted May 23, 2007 Share Posted May 23, 2007 so what's the problem? The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
Gif Posted May 23, 2007 Author Share Posted May 23, 2007 so what's the problem?ok as i mentioned im not too familiar with INIs so i will just explain what i want to do. i want the script to write the ini , and then as u can see read the sections and add them to the main gui as GuiCtrlCreateListViewItem under the GuiCtrlCreateListView...this does not workswhatever i instert in the first one the GuiCtrlCreateListViewItem is alwaye returned as 1any suggestions? Link to comment Share on other sites More sharing options...
eltorro Posted May 23, 2007 Share Posted May 23, 2007 I believe that you would have to take the array returned by IniReadsection and convert each element to a ListViewItem. Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 23, 2007 Share Posted May 23, 2007 Also, your variable $ones is just the return code from the IniWriteSection() function, not a string of the section name. 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...
James Posted May 23, 2007 Share Posted May 23, 2007 Func _GetUser() If FileExists(@ScriptDir & '\names.ini') Then $User_index = _GUICtrlListViewGetItemCount($UserList) $ImportImage = IniReadSection($UserFile, "Image") $ImportName = IniReadSection($UserFile, "Users") $ImportPassword = IniReadSection($UserFile, "Password") For $a = 1 To $ImportImage[0][0] GUICtrlCreateListViewItem($ImportName[$a][1] & "|" & $ImportPassword[$a][1] & "|" & FileGetLongName($ImportImage[$a][1], 1), $UserList) GUICtrlSetImage(-1, $ImportImage[$a][1]) If @error = 1 Then MsgBox(0x10, "Error", "There was an error importing user data.") Next _GUICtrlListViewSetColumnWidth($UserList, 2, $LVSCW_AUTOSIZE) Else MsgBox(0x10, "Request Error", "Could not import names. File doesn't exist.") EndIf EndFunc ;==>_GetUser There is a excert from my program. Just change the control ID's. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Gif Posted May 23, 2007 Author Share Posted May 23, 2007 Func _GetUser() If FileExists(@ScriptDir & '\names.ini') Then $User_index = _GUICtrlListViewGetItemCount($UserList) $ImportImage = IniReadSection($UserFile, "Image") $ImportName = IniReadSection($UserFile, "Users") $ImportPassword = IniReadSection($UserFile, "Password") For $a = 1 To $ImportImage[0][0] GUICtrlCreateListViewItem($ImportName[$a][1] & "|" & $ImportPassword[$a][1] & "|" & FileGetLongName($ImportImage[$a][1], 1), $UserList) GUICtrlSetImage(-1, $ImportImage[$a][1]) If @error = 1 Then MsgBox(0x10, "Error", "There was an error importing user data.") Next _GUICtrlListViewSetColumnWidth($UserList, 2, $LVSCW_AUTOSIZE) Else MsgBox(0x10, "Request Error", "Could not import names. File doesn't exist.") EndIf EndFunc ;==>_GetUser There is a excert from my program. Just change the control ID's. thanks a lot Link to comment Share on other sites More sharing options...
James Posted May 23, 2007 Share Posted May 23, 2007 No problem. Glad I could help. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ 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