Old 24th October 2007, 16:51   #1
PGJ
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!
PGJ is offline   Reply With Quote
Old 24th October 2007, 17:55   #2
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
http://nsis.sourceforge.net/Category...tion_Functions
Yathosho is offline   Reply With Quote
Old 24th October 2007, 19:41   #3
PGJ
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.
PGJ is offline   Reply With Quote
Old 24th October 2007, 19:56   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
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
kichik is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump