Archive: radio button on a custom page


radio button on a custom page
first of all i would like to thanks who gives me help in my last thread, i have solved everything with your suggestions.

now i got a problem with a custom page.

i wish to create a mirror selector.

creating a var, if mirror 1 is selected var become http://wwww.url.ex
else if mirror 2 is selected var became http://otherurl.ex

now, i have understand how to do radio buttons in a custom page..

        ${NSD_CreateRadioButton} 0 12u 100% 10u "mirror 1"
Pop $mirror1

${NSD_CreateRadioButton} 0 24u 100% 10u "mirror 2"
Pop $mirror2
nsDialogs::Show


but... now?

how can i set a variabile with the radio buttons?
if check box 1 is setted $server become X else Y

how?

Don't hesitate to search the forum,

http://forums.winamp.com/search.php?...by=&sortorder=

Of course there are 100s examples if you dig deeply.


sorry but i have seen a thousand threads but i didn't find what i'm searching.

could you make me some code for example even only with messagebox?


This search result should be able to help you:
http://forums.winamp.com/showthread....s+radio+button


solved:

    Var Dialog
var hwnd
Var Checkbox1
Var Checkbox2
Var Checkbox_State
var server

Function mirrorselection
nsDialogs::Create 1018
Pop $Dialog
${NSD_CreateRadioButton} 0 12u 100% 10u "mirror 1"
Pop $checkbox1
${NSD_AddStyle} $checkbox1 ${WS_GROUP}
${NSD_OnClick} $checkbox1 radioclick
${NSD_CreateRadioButton} 0 24u 100% 10u "mirror 2"
Pop $checkbox2
${NSD_OnClick} $checkbox2 radioclick
nsDialogs::Show
FunctionEnd

Function RadioClick
Pop $hwnd
${If} $hwnd == $checkbox1
strcpy $server "http://xxx.com"
MessageBox MB_OK "selezionato: $server"
${ElseIf} $hwnd == $checkbox2
strcpy $server "http://www.yyy.com/"
MessageBox MB_OK "selezionato: $server"
${EndIf}

also, perhaps...
http://nsis.sourceforge.net/NsDialog...ton_selections