onad
27th February 2006 10:05 UTC
In .onInit langval does not get assigned, why?
Hi all, In .onInit a language different value does not get assigned to variable. It can be that I'm not yet fully awake, what could be my thinking mistake this morning?
Function .onInit
...
; NOT WORKING BELOW
StrCpy $9 "$(MUI_TEXT_FINISH_INFO_TITLE)"
MessageBox MB_OK "$9"
; BUT BELOW IS WORKING....
MessageBox MB_OK "$(MUI_TEXT_WELCOME_INFO_TITLE)"
...
FunctionEnd
I need this because of later on I want to do:
... LangString $9 $LANGUAGE $(MUI_TEXT_FINISH_INFO_TITLE)
Afrow UK
27th February 2006 16:08 UTC
Not sure what you are trying to do here, but LangString is a compile-time instruction.
-Stu
onad
28th February 2006 10:23 UTC
Well, just try to forget the langstring,
My main problem still exists...
onad
28th February 2006 10:25 UTC
being
...
; NOT WORKING BELOW
StrCpy $9 "$(MUI_TEXT_FINISH_INFO_TITLE)"
MessageBox MB_OK "$9"
; BUT BELOW IS WORKING....
MessageBox MB_OK "$(MUI_TEXT_WELCOME_INFO_TITLE)"
Why?
Takhir
28th February 2006 10:51 UTC
What about this combined code ;) ?
StrCpy $9 "$(MUI_TEXT_WELCOME_INFO_TITLE)"
MessageBox MB_OK "$9"
onad
28th February 2006 15:00 UTC
That is what I mean, it is not working like expected....
onad
28th February 2006 15:10 UTC
Well thank all, I think I have to clarify a little more, will make a test script to show what I mean, until then, all fine.
kichik
28th February 2006 18:49 UTC
If you're talking about .onInit and $LANGUAGE, you could only be talking about changes to $LANGUAGE not affecting LangStrings until after .onInit. That's how it works. LangStrings are updated twice - before .onInit and after it. You can use a switch in .onInit.