Jump to content
Sign in to follow this  
Jasio

Creating an .ini

Recommended Posts

Jasio

I just wanted to create an ini with variables that the user can change to their needs, i wanted to know how to make the script read this ini, then run according to the modifications in the ini

thanks B)

Share this post


Link to post
Share on other sites
Helge

The code below is a simple example of how to get settings from outside the script,

use them in the script, and how to save them back to the file for use later, if wanted.

$readValue = IniRead(@ScriptDir & "\ini_test.ini", "section", "testkey", "default text...")
$newValue = InputBox("Test : INI<->Var", "Input a new text for the testkey..", $readValue)

If NOT @error Then IniWrite(@ScriptDir & "\ini_test.ini", "section", "testkey", $newValue)

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.