m_srinivasmca02
27th September 2006 15:25 UTC
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
n_baua
19th October 2006 07:55 UTC
Hello,
Even I need that too.
kichik
20th October 2006 10:30 UTC
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
HaMsTeYr
21st October 2006 21:27 UTC
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?
kichik
24th October 2006 19:48 UTC
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.