Archive: Abt Radio Buttons


Abt Radio Buttons
Hi,

I added one custom page using NSIS with some radio buttons.Based on a selection of radio button it has to pick up the exact CUSTOM page.

Please, help me on this regard.If possible can any one send a sample script to do that.

Thanks in advance.


regards,
srinivas


Hello,
Even I need that too.


The selected radio button field will have a state of 1. Simply read the state values of each radio button, and decide which page to show according to the selected one. Something like:

Function Page2
ReadINIStr $1 "$PLUGINSDIR\page1.ini" "Field 1" "State"
ReadINIStr $2 "$PLUGINSDIR\page1.ini" "Field 2" "State"
ReadINIStr $3 "$PLUGINSDIR\page1.ini" "Field 3" "State"
${If} $1 == 1
File /oname=$PLUGINSDIR\page2.ini rb1.ini
${Else} ${If} $2 == 1
File /oname=$PLUGINSDIR\page2.ini rb2.ini
${Else} ${If} $3 == 1
File /oname=$PLUGINSDIR\page2.ini rb3.ini
${EndIf}

InstallOptions::dialog $PLUGINSDIR\page2.ini
FunctionEnd

Hey there, this is also on the topic of radio buttons, mine doesn't seem to work in the modern ui. I've even tried compiling the one in the NSIS online page, and that doesn't work.

I've attached my .nsi file, and the commented out coding is the original one... can anyone tell me why this isn't working?


Put .onInit and .onSelChange after the section definitions. If the sections are defined later in the script, ${g1o1} and friends have no meaning and they all translate to zero.