Sign in to follow this  
Followers 0
Beginner321

Help with Small Script

3 posts in this topic

I am not working on a real project right now. I just wanted to know how to take text from an input box and put it into an ini file.

I know the about the command iniwrite. I can use the variable from the Input Box and take it in the ini file. But what im having trouble with is that the ini file keeps getting over written. I want to keep all the text from the input box and write each text in a different key.

$input=InputBox("","Type Something")
IniWrite("Initest.ini", "A", "1",$input)

Don't solve the problem, I just want to know what command I should read up on.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

INIWrite() is supposed to overwrite values. Run this, see what happens...

$x = 0

Do
    $input=InputBox("","Type Something")
    IniWrite("Initest.ini", "A", $x, $input)
    $x += 1
Until $input = ""

Not really sure what you are trying to do but this will input values in initest.ini, section [A] starting with key 0, then key 1,2,... until you enter nothing in the input box.

Edited by MrMitchell

Share this post


Link to post
Share on other sites

INIWrite() is supposed to overwrite values. Run this, see what happens...

$x = 0

Do
    $input=InputBox("","Type Something")
    IniWrite("Initest.ini", "A", $x, $input)
    $x += 1
Until $input = ""

Not really sure what you are trying to do but this will input values in initest.ini, section [A] starting with key 0, then key 1,2,... until you enter nothing in the input box.

Thanks I'll try it. I'm pretty sure it'll work.

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