Prev Previous Post   Next Post Next
Old 11th July 2005, 14:28   #1
Comperio
Major Dude
 
Comperio's Avatar
 
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
Unhappy FileWrite question

I've been working on an installation that creates an NSH file for another installer. (This allows to get user input at compile time.)

I found an odd problem with FileWrite. (either it's a bug or I'm just being stupid!)

I need to include the actual characters "$\" in the text of the file so that I can get a MessageBox to print multiple lines.

Here's my code I'm currently using:
FileWrite $0 'MessageBox MB_OK "This is one line $$\\r$$\\nAnd this is another line'$\r$\n"

The problem is that I get this as the output:
MessageBox MB_OK "This is one line$\\r$\\nAnd this is another line"

If I use anyting but "$$\\" in my FileWrite command, I get a compiler error that the variable/constanst is undefined.

Is there any way I can get just a single backslash without resorting to using FileWriteByte? (I want to keep things as simple as possible.)
Comperio is offline   Reply With Quote
 
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