Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   NSIS and WordPad (http://forums.winamp.com/showthread.php?t=250312)

himitsu 4th July 2006 03:36

NSIS and WordPad
 
Hey I'm having some difficulty using NSIS to edit a wordpad file during an install and I was hoping someone could help me out.

Basically, I need to add two lines of text to an enviroment file that uses WordPad's wacky rtf format but no matter what I do it always comes out as one line.

Here's what I'm currenly doing:

FileOpen $0 "C:Myfile.env" a
FileSeek $0 0 END
FileWrite $0 "Line 1 \n Line 2"
FileClose $0

I've even tried to open, find the end and close the file once for each line FileOpen but no matter what, I can't insert a newline.

Can anyone help me out with this? Do I have to use Ascii, Unicode, Magic beans? If I do, how do I do it?!

Thanks for the help!

Red Wine 4th July 2006 04:29

FileWrite $0 "Line 1$\r$\nLine 2"


All times are GMT. The time now is 05:55.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.