AlexBienheureux
8th September 2003 14:28 UTC
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
kichik
8th September 2003 14:37 UTC
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.
AlexBienheureux
8th September 2003 15:19 UTC
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
kichik
8th September 2003 15:22 UTC
!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:
Joost Verburg
8th September 2003 15:23 UTC
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.
Brummelchen
8th September 2003 15:23 UTC
i think it whis way:
!insertmacro MUI_INSTALLOPTIONS_DISPLAY_RETURN "io.ini"
Pop $0
StrCmp $0 "Cancel" Fin
Joost Verburg
8th September 2003 15:27 UTC
If you prefer to ask French people, go to this forum: http://www.winampfr.com/forum/index.php
AlexBienheureux
8th September 2003 15:43 UTC
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"...
AlexBienheureux
8th September 2003 15:44 UTC
I find it's ok, sorry...
kichik
8th September 2003 15:45 UTC
You should remove:
!insertmacro MUI_INSTALLOPTIONS_DISPLAY mdp.ini
That's what causing the problem.