Meduse
25th June 2003 16:35 UTC
MUI_FINISHPAGE_RUN_FUNCTION Problem
Hello,
I want to run a custom function on the finish page.
I want too that a checkbox allow or not to run my function
my code:
!define MUI_FINISHPAGE_RUN_FUNCTION my_function
I don t find the code to show the checkbox on the finish page
help me please
thanks
Chris
pengyou
25th June 2003 16:42 UTC
I think you missed out an important line. This works for me:
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_FUNCTION "MyFunction"
Brian
Meduse
25th June 2003 16:51 UTC
thanks for your answer Brian,
but on the finish page it s written run my_prog.exe near the check box and i would like to change this text... :-)
pengyou
25th June 2003 17:03 UTC
It is easy to change the standard messages used by MUI. All you have to do is specify your custom message BEFORE you use the MUI_LANGUAGE macro.
Here is how I modified the text shown next to the checkbox on the Finish page:
!insertmacro MUI_LANGUAGEFILE_STRING MUI_TEXT_FINISH_RUN "Run my special function"
!insertmacro MUI_LANGUAGE "English"
Brian
Meduse
25th June 2003 17:12 UTC
thank you a lot
Chris
pengyou
25th June 2003 20:34 UTC
Glad I was able help out.
When I showed how to alter a standard MUI message, I forgot to mention how you can find out which text string you have to define before you use the MUI_LANGUAGE macro. The MUI messages are defined in the "NSIS\Contrib\Modern UI\Language files" folder (the English messages are in the file "English.nsh" in that folder).
For example, the entry for the standard message for the "Run" checkbox on the Finish page is:
!insertmacro MUI_LANGUAGEFILE_STRING MUI_TEXT_FINISH_RUN "&Run ${MUI_PRODUCT}"
The '&' before 'Run' defines 'R' as the accelerator key for this checkbox. You can use '&' when you define your own version of the message (eg "My &Program" will use 'P' as the accelerator key).
Brian