|
|
#1 |
|
Junior Member
Join Date: Jan 2003
Posts: 27
|
can LangString text be combined without an intermediate step
Below is a sample. If I first copy the
LangString message to $0 then I can use it with other text "$0", "abc$0", and "$0abc" but $(message) itself can not be combined. Am I doing something wrong or is this simply not an option? Admittedly its easy to get around but makes the code less clear. Also you may want to emphasis in the docs to use parenthesis () and not curly braces {} as I didn't notice this until careful looking (the font my browser displayed the docs in makes it hard to see any difference). :-) Thanks, Jeremy [edit by kichik]see script below (please attach large scripts)[/edit] Last edited by PerditionC; 21st January 2003 at 18:28. |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Sep 2002
Location: At [4C69:6E6B]
Posts: 561
|
Your code isn't very long, but you should post it as an attachment. if you have a few lines of code, you can highlight the code by using [ php ] [ /php ] around the code. Without the spaces before and after 'php'.
- Claudia Pelsmaeker |
|
|
|
|
|
#3 |
|
Major Dude
Join Date: Sep 2002
Location: At [4C69:6E6B]
Posts: 561
|
I tried to find the error, but couldn't. By the way, the documentation doesn't say anything about when to use ${symbol} and when $(symbol). Sometimes it even generates a couple of errors more:
warning: unknown variable "{Message}" detected, ignoring warning: unknown variable "{Message)" detected, ignoring warning: unknown variable "(Message)" detected, ignoring
- Claudia Pelsmaeker |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Jan 2003
Posts: 27
|
(Sorry about not attaching)
Well for me, each section prints a message, with all 5 I get: English message hi$(Message) & a warning during compile hiEnglish message English message English messagehi the desired output is: English message hiEnglish message hiEnglish message English message English messagehi English messagehi As best I can tell, you use curly braces ${} for all defines, parenthesis $() for all LangStrings, and $val for predefined registers. Any other use I've tried results in the unknown variable warning. With $val and ${} I can combine with literal text without the need for an explicit StrCpy, but when using $() I have to use a StrCpy and a temp variable. That is one must StrCpy $0 $(message) and then StrCpy "pre-text$0 post-text", and if one has another LangString to add, StrCpy $1 $(another_message) then StrCpy $0 "$0$1" because even StrCpy $0 "$0$(another_message)" will fail ... Note: I am using NSIS 2.0b0 if it makes a difference. |
|
|
|
|
|
#5 | |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
Quote:
I will make a note about the different braces. NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
|
#6 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
=/
A little typo there with the expansion, I will fix that too
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Jan 2003
Posts: 27
|
Ok, I was just making sure I wasn't overlooking something. The above doc update definitely answers my question.
Thank you. |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|