|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Jul 2007
Posts: 16
|
hi,
as my subjects says i've the following problem: if the subsection one is selected, the subsection two should automatically selected by installer. so the user must not select option two manually. the reason why i'm need this, is that option two is required for option one or with other words without installing option two option one isn't working afterwards the installation. when option two is deselected option one also must automatically deselected. PHP Code:
can anyone help? graphically: Sectiongroup first [_] option one [_] option two [_] option three ... user make his choice: Sectiongroup first [x] option one [_] option two [_] option three ... so the installer sets option two automatically as selected: Sectiongroup first [x] option one [x] option two [_] option three ... |
|
|
|
|
|
#2 |
|
Junior Member
Join Date: Jun 2007
Posts: 38
|
I am not really sure about this method but give it a try
In the .onSelChange function Use the SectionGetFlags for the Section 1 and check if its selected by checking the SF_SELECTED flag. if so then Use the SectionSetFLags for the section 2. Now also check if section 2 is selected without selecting Section 1 by the above method. If so then deselect it by SectionSetFlags. I hope this helps. |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jul 2007
Posts: 16
|
i'm very confused about how to do this stuff. i've searched again and found this topic: h t t p ://forums.winamp.com/showthread.php?s=&threadid=272007&highlight=SectionSetFlags (so sorry guys for my double post)
Afrow UK gives an very good example there on how to do this. i take his code and made an example installer (without the possibility to install of course). see this example in the attached file here. problem is that i don't really understand what's going on in this code. another prob is that, you must select "option two" twice beforce the required "option one" is automatically selected. ps: if a forum moderator read this, i have two questions: why is it impossible two post a link to a nsis forum site and why is it also impossible to search for the keyword "winamp"? |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Jun 2007
Posts: 38
|
Here you go. I have modified the script to be executed correctly.
How does it work?? Assume 2 states which require modification State 0 : When option 2 is selected option 1 needs to be selected. State 1: When option 1 is unselected option 2 needs to be deselected. I have initialized to state 0 in oninit. When it both the options are selected it automatically moves to state 1(since we need to keep checking if option 1 is selected). If option 2 are deselected it moves to state 0(since we need to keep checking for option 2 being checked so that we can check option 1). I hope my explanation helped. |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|