# HG changeset patch # User Oleksandr Gavenko # Date 1274106412 -10800 # Node ID ce95fd596812b0544caa6303bca30edcfc76404e # Parent fa4c52109fd8c70905f95747c4a4a327feb9826e About strings in NSIS. diff -r fa4c52109fd8 -r ce95fd596812 nsis.rst --- a/nsis.rst Mon May 17 17:21:21 2010 +0300 +++ b/nsis.rst Mon May 17 17:26:52 2010 +0300 @@ -1,21 +1,20 @@ -*- mode: outline; coding: utf-8 -*- -* String. +* Strings. + +String is a sequence of chars. To represent spaces enclose string in quotes. +To escape quote use $\. ${MACRO_NAME}, $(VAR_NAME) substituted with +macros/variable values. To escape $ use $$. + + MessageBox MB_OK "I'll be happy" ; this one puts a ' inside a string + MessageBox MB_OK 'And he said to me "Hi there!"' ; this one puts a " inside a string + MessageBox MB_OK `And he said to me "I'll be happy!"` ; this one puts both ' and "s inside a string + MessageBox MB_OK "$\"A quote from a wise man$\" said the wise man" ; this one shows escaping of quotes * Variables. Allowed chaacters for variable names: [a-z][A-Z][0-9] and '_'. -** Macros definition. - -To define macro variable: - - !define NAME "STRING" - -To access to there value use such syntax: - - ${NAME} - ** Variable definition. To declare variable: @@ -29,7 +28,7 @@ To assign value to variable use: - StrCpy $NAME "STRING" + StrCpy $NAME STRING To access to there value use such syntax: @@ -39,7 +38,7 @@ To declare multilingual string use: - LangString NAME LANGUAGE_ID "STRING" + LangString NAME LANGUAGE_ID STRING For 'LANGUAGE_ID' use '${LANG_ENGLISH}', '${LANG_RUSSIAN}', etc. @@ -47,7 +46,7 @@ $(NAME) -** Standard language strings. +*** Standard language strings. You can see list of such var under Contrib\Language Files\*.nlf files, which loaded by 'LoadLanguageFile'. @@ -55,3 +54,13 @@ To access to there value use such syntax: $(^NAME) + +** Macros definition. + +To define macro variable: + + !define NAME STRING + +To access to there value use such syntax: + + ${NAME}