Archive: change a variable inside a function


change a variable inside a function
hello

this is what I do to change the text of my pages :


var MUI_FINISHPAGE_TITLE

for the finishpage :

!define MUI_FINISHPAGE_TITLE "$MUI_FINISHPAGE_TITLE"
!insertmacro MUI_UNPAGE_FINISH


and then, in the .onInit :
StrCpy $MUI_FINISHPAGE_TITLE "blabla"


this way, i can define a different text in function of the different values of a .ini temp file

-----> this works great

now, this is what I'm trying to do :

!define MUI_PAGE_CUSTOMFUNCTION_PRE "bla"
!define MUI_FINISHPAGE_TITLE "$MUI_FINISHPAGE_TITLE"
!insertmacro MUI_UNPAGE_FINISH


and then :

Function bla
StrCpy $MUI_FINISHPAGE_TITLE "blabla"
FunctionEnd

the same thing but outside the .onInit does not work...

why ?

how can I change the variable value inside my function ?



thx for your eternal and great answers, guys ;)

Correct me if I’m wrong, but for a custom page you will need to edit the custom page’s ini file at run time just before the page is displayed to set the title.


well you're right, I can do it with the ioSPecial.ini ;)
this doesn't answer the question, but I can circumvent it ;)

thx


I think this is the answer you were looking for:

Instead of this:
!define MUI_PAGE_CUSTOMFUNCTION_PRE "bla"

use this:
!define MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT "bla"


YES !

this works great

thx comperio :p