Archive: Problems with a select box


Problems with a select box
Hi all,

sorry my english is not the best :-)

ive got a problem wir a select box during the install.

the user can select "Master", "Wave" and "Cpos" and then the script has to wirte in the cpos.ini "0", "1" or "2".
not the clear text.

so here my try but it isnt working.

!insertmacro MUI_INSTALLOPTIONS_READ $0 "ioGeneral.ini" "Field 2" "State"
StrCmp $0 "Master" +1
StrCpy $1 "2"
StrCmp $0 "Wave" +1
StrCpy $1 "1"
StrCmp $0 "cPOS" +1
StrCpy $1 "0"
WriteINIStr $INSTDIR\cpos.ini Options VolumeControl $1

the setting is after the setup everytime at "0" for cPOS the last option.

thanks for help.

with regards
philipp


did you need more information??
over 20 views and no answer?

thanks

philipp


There are two problems with your current code, FYI, +1 is the same as 0 (i.e. jumps to the proceeding instruction (you'd need +2)) and also you should have a Goto after each StrCpy to jump to the end.

Just use ${If}, ${ElseIf} and ${EndIf} from LogicLib.nsh.

Stu