Jump to content

IniWrite Example


bmarky
 Share

Recommended Posts

Just wanted to learn how to manage a simple ini file. Here is what i made:

If FileExists(@ProgramFilesDir & "\urname.ini") Then
    $var = IniRead(@ProgramFilesDir & "\urname.ini", "alapok", "name", "NotFound")
    MsgBox(48, "Name", "Your name is: " & $var)
Else
    $name = InputBox ("Name", "You run this script first time. Please, enter your name.", "Your name comes here")
    IniWrite(@ProgramFilesDir & "\urname.ini", "alapok", "name", $name)
    MsgBox(64,"Name", "Your name have been stored.")
EndIf

It comes handy, if you forgot your name :P

Mark

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...