Sign in to follow this  
Followers 0
Karting

iniwrite does not write

4 posts in this topic

#1 ·  Posted (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 by Karting

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

Yep, that did it :)

Tried everything for like 1,5 hours and now feel like a moron ;)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0