Jump to content
Sign in to follow this  

GUI & IniWrite Problems (Not Saving)

Recommended Posts

Hiya everyone, I seem to have run into an error involving my program and would like some assistance solving it! I'm creating an automatic login program for a game called Rakion with customizable options and such... Anyways, everything was going fine until I added support for different installation directories. All hell broke loose.

Rather than post the entire script, I will merely provide snippits of the code pertaining to my problem


$ini_Directory1 = IniRead("Rakion Autoloader.ini", "Directory", "NyxLauncher", "")

$ini_Directory2 = IniRead("Rakion Autoloader.ini", "Directory", "ScreenShots", "")

GUICtrlCreateButton ("Save Changes", 15, 260, 110, 25, $BS_CENTER)

GUICtrlSetOnEvent(-1, "configSave")


GUICtrlCreateButton ("Browse", "145", "105", "60", "25", "-1")

GUICtrlSetOnEvent(-1, "Browse")

GUICtrlCreateLabel ("NyxLauncher.exe", 25, 110, 180, 15)

$GUI_Directory1 = GUICtrlCreateInput ( $ini_Directory1, 20, 135, 185, 20)

Func Browse()

$path = FileOpenDialog ( "NyxLauncher.exe", "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}", "(*.exe)", 3, "NyxLauncher.exe")

return GUICtrlSetData($GUI_Directory1, $path)



GUICtrlCreateButton ("Browse", "145", "160", "60", "25", "-1")

GUICtrlSetOnEvent(-1, "Find")

GUICtrlCreateLabel ("ScreenShots", 25, 165, 180, 15)

$GUI_Directory2 = GUICtrlCreateInput ( $ini_Directory2, 20, 190, 185, 20)

Func Find()

$path = FileSelectFolder ( "Rakion ScreenShot Directory", "", 1, "")

return GUICtrlSetData($GUI_Directory2, $path)


And here's the save code:


Func configSave()

$ini_Security = IniRead("Rakion Autoloader.ini", "Security", "Level", "3")

If FileExists($IniFile) Then



If verDirectory1() == "true" Then

IniWrite("Rakion Autoloader.ini", "Directory", "NyxLauncher", GUICtrlRead($GUI_Directory1))


MsgBox(48, "Error", "Unable to locate NyxLaucher.exe.")


If verDirectory2() == "true" Then

IniWrite("Rakion Autoloader.ini", "Directory", "ScreenShots", GUICtrlRead($GUI_Directory2))


MsgBox(48, "Error", "Incorrect directory for Screenshots.")



I've put MsgBoxes everywhere with every possible combination of value and they all work. GUICtrlRead(...) gives me the correct directory, as does $path, but neither of them save to the ini file. It seems to delete the section of the directory on save aswell, rather than saving... Any ideas?

Thanks for the help,


Edited by thetwistedpanda

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...