Karting Posted February 6, 2012 Posted February 6, 2012 (edited) Hi! I really cant ficure what wrong. I am unable to write to ini file using iniwrite. Heres the code: func B1() $func1 = FileOpenDialog("Select new ad", @HomeDrive & "", "Videos (*.avi;*.mpg)", 1) If @error Then MsgBox(4096, "", "Was not changed") Else Global $change1 = "1" $func1 = StringReplace($func1, "|", @CRLF) global $newad1 = "New selection: " & $func1 global $newadini1 = $func1 $Label1 = GUICtrlCreateLabel($newad1, 110, 55, 380, 17) EndIf EndFunc func savesettings() if $change1 = 1 then iniWrite(@ScriptDir & "settings.ini","ads","ad1",$newadini1) IniWrite(@ScriptDir & "settings.ini","tests","test1",$newadini1) MsgBox(1,$newadini1,$newadini1) Else EndIf global $ad1chance = "0" global $ad2chance = "0" global $ad3chance = "0" global $ad4chance = "0" global $ad5chance = "0" EndFunc Any pointers? EDIT: Unrelated code removed. Edited February 6, 2012 by Karting
Xenobiologist Posted February 6, 2012 Posted February 6, 2012 Maybe @ScriptDir & "settings.ini" should be @ScriptDir & "settings.ini" Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
Karting Posted February 6, 2012 Author Posted February 6, 2012 Yep, that did it Tried everything for like 1,5 hours and now feel like a moron
Xenobiologist Posted February 6, 2012 Posted February 6, 2012 Lol, finally you got it :-) Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
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