Escaping quotes

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1804 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2002-11-21 19:15:32 +00:00
parent a425fc05d3
commit f96791b6ca

View file

@ -16,15 +16,18 @@ A NSIS Script File (.nsi) is just a text file with a series of commands.
\b To represent strings that have spaces, use quotes.
\b quotes only have the property of containing a parameter if they begin the parameter.
\b Quotes only have the property of containing a parameter if they begin the parameter.
\b quotes can be either single quotes, double quotes, or the backward single quote.
\b Quotes can be either single quotes, double quotes, or the backward single quote.
\b You can escape quotes using $\\.
\b Examples:
\c MessageBox MB_OK "I'll be happy" ; this one puts a ' inside a string
\c MessageBox MB_OK 'And he said to me "Hi there!"' ; this one puts a " inside a string
\c MessageBox MB_OK `And he said to me "I'll be fucked!"` ; this one puts both ' and "s inside a string:
\c MessageBox MB_OK `And he said to me "I'll be fucked!"` ; this one puts both ' and "s inside a string
\c MessageBox MB_OK "$\\"A quote from a wise man$\\" said the wise man" ; this one shows escaping of quotes
\b To extend a command over multiple lines, use a backslash (\\) at the end of the line, and the next line will effectively be concatenated the end of it. For example: