Archive: modern ui and installoptions


modern ui and installoptions
[afflicted for English, but I translated with google]


hello,

I have a problem with installoptions.
I try to use it with "modern ui", but it doesn't works.
I manage well to post the page created, but I would like to then carry out an action when one clicks on "next". the problem and that the action is carried out even if I click on "cancel" or "precedent"...

:( :(

I have make research on all the sides, but I do not find anything the whole...

for the interface "normal" I use:

StrCmp $R0 "cancel" Fin
StrCmp $R0 "back" Fin
StrCmp $R0 "success" ""
"Action"

Fin:




with modern ui, I think that it is necessary to use MUI_INSTALLOPTIONS_DISPLAY_RETURN or MUI_INSTALLOPTIONS_SHOW_RETURN, but I do not see at all how.



thank you for your assistance
:p


MUI_INSTALLOPTIONS_DISPLAY_RETURN and MUI_INSTALLOPTIONS_SHOW_RETURN preper the same output as a normal IO call for you on the stack, in the exact order. All you need to do is Pop like always.

BTW, if you're using the latest CVS version you can use the leave function of the page which is only called when the user clicks next.


sorry but I do not understand how to use these functions.

with interface "normal" my script :

StrCmp $R0 "cancel" Fin
StrCmp $R0 "back" Fin
StrCmp $R0 "success" ""
ReadINIStr $R0 $PLUGINSDIR\mdp.ini "Field 2" State
StrCmp $R0 "essai" "" Erreur
MessageBox MB_OK "valeur : $R0"
Fin:


thank you to have answered also quickly


!insertmacro MUI_INSTALLOPTIONS_DISPLAY_RETURN iniFile.ini
Pop $R0
StrCmp $R0 "cancel" Fin
StrCmp $R0 "back" Fin
StrCmp $R0 "success" ""
!insertmacro MUI_INSTALLOPTIONS_READ $R0 mdp.ini "Field 2" State
StrCmp $R0 "essai" "" Erreur
MessageBox MB_OK "valeur : $R0"
Fin:


Did you read the information in the Modern UI Readme about InstallOptions? It explains all the macros. You should also check the InstallOptions.nsi example.


i think it whis way:

!insertmacro MUI_INSTALLOPTIONS_DISPLAY_RETURN "io.ini"
Pop $0
StrCmp $0 "Cancel" Fin


If you prefer to ask French people, go to this forum: http://www.winampfr.com/forum/index.php


sorry, I read the doc, but I find to resolve my problem...


This script is ok :

-------------------------------------------------------------
Function MaPage
!insertmacro MUI_HEADER_TEXT "Test" "Ceci est un essai"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY mdp.ini

!insertmacro MUI_INSTALLOPTIONS_DISPLAY_RETURN mdp.ini
Pop $R0
StrCmp $R0 "cancel" Fin
StrCmp $R0 "back" Fin
StrCmp $R0 "success" ""
!insertmacro MUI_INSTALLOPTIONS_READ $R1 mdp.ini "Field 2" State
MessageBox MB_OK "Valeur : $R1"

Fin:
FunctionEnd
-------------------------------------------------------------

just a little problem, I must click 2 times to validate when I click on "next", "precedent" or "cancel"...


I find it's ok, sorry...


You should remove:

!insertmacro MUI_INSTALLOPTIONS_DISPLAY mdp.ini

That's what causing the problem.