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)
In .onInit langval does not get assigned, why?
8 posts
Not sure what you are trying to do here, but LangString is a compile-time instruction.
-Stu
-Stu
Well, just try to forget the langstring,
My main problem still exists...
My main problem still exists...
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?
...
; 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?
What about this combined code 😉 ?
StrCpy $9 "$(MUI_TEXT_WELCOME_INFO_TITLE)"
MessageBox MB_OK "$9"
That is what I mean, it is not working like expected....
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.
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.