Old 18th September 2007, 21:40   #1
CPIbilly
Junior Member
 
Join Date: Sep 2007
Posts: 2
Send a message via ICQ to CPIbilly
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
CPIbilly is offline   Reply With Quote
Old 19th September 2007, 15:04   #2
CPIbilly
Junior Member
 
Join Date: Sep 2007
Posts: 2
Send a message via ICQ to CPIbilly
did you need more information??
over 20 views and no answer?

thanks

philipp
CPIbilly is offline   Reply With Quote
Old 19th September 2007, 16:57   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump