Jump to content

Recommended Posts

Posted (edited)

Im trying to get the input from a user, in an InputBox, into an .ini file.

$directory = InputBox("Select Directory", "Please type in the directory you wish to use.")
IniWrite("C:\test.ini", "test", "aaa", "$directory")

As it is, its writing $directory into the .ini file. :) I need it to be an .ini file, because the inputted directory will change frequently, and Id rather have the script self contained. Im also going to need the script to look at the .ini file, to find out where the directory is, but I assume that

$var = IniRead("C:\test.ini", "test", "aaa", "[name of dir]")

will provide me with the variable I need?

Edited by Solomon
Posted (edited)

IniWrite("C:\test.ini", "test", "aaa", $directory)

Remove double quote for $directory.

$var = IniRead("C:\test.ini", "test", "aaa", "default directory")
Edited by Joon

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
×
×
  • Create New...