|
|
#1 |
|
Junior Member
Join Date: Jul 2007
Posts: 5
|
edit line in text file and replace with text by user
Hey guys,
Is there any function or script for this thing: I wanted to script a small installer, which asks the user to enter any word, which will be placed into a specific txt file into a certain line. E. g. there's a test.txt, which includes the line "name test". The user starts the installer and it gives you an edit box, where you can put a word or text, what ever you want. Lets say it would be "newname". Then press Ok or next button and if you check the test.txt again, it should contain "name newname". Can someone help me or is it possible? Thx for all your help in advance! |
|
|
|
|
|
#2 |
|
Forum King
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
|
|
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jul 2007
Posts: 5
|
I already hat a look at these functions, but none of them could provide a function like an "edit box" in which the user can type his information.
|
|
|
|
|
|
#4 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
To add an edit box, you can use InstallOptions or nsDialogs. Both have examples in the Examples folder.
To replace a line in a file, you can use one of the functions Yathosho posted, or LineFind. NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|