Jump to content

Prompt to change text in a file


Recommended Posts

Brentp,

Check this link and see if will help you.

jfcby

Determined -- Devoted -- Delivered Make your mind up -- to seriously apply yourself -- accomplishing the desired results. **** A soft answer turneth away wrath: but grievous words stir up anger. Proverbs 15:1 KJB ****

Link to comment
Share on other sites

Does any one have a script that will prompt the user to enter some text, and then it will edit a ini file on c: and replace some holding text with the text the user entered.

Thanks all

Brent

Im guessing you want something like this:

If FileExists("config.ini") = 1 Then ;if the file 'config.ini' exists
    $Input = InputBox("input","enter your data")
    IniWriteSection ("config.ini", "Configuration", "config1="&$Input)
Else;if the file 'config.ini' DOESN'T exist
    $Input = InputBox("input","enter your data")
    IniWriteSection ("config.ini", "Configuration", "config1="&$Input)
    EndIf

Also, to do multiple lines for the .ini (if you don't know how to already)

IniWriteSection ("config.ini", "Configuration","config1="&$Input & @LF & "config2="&$Input2)

If this isn't what you wanted, woops! XD

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...