rxs2k5
22nd May 2006 14:08 UTC
About Section Flags
Hi people,
I cannot get this to work, I trying to make the install button on component page to be un-highlighted when two or more sections is not check.
Section /o AAA Dum1
SectionEnd
Section /0 BBB Dum2
SectionEnd
How can I make in such a way using "Function .onSelChange" to change the install button.
1.
if dum1 is selected or dum1 and dum2 is selected or dum2 is selected, the " install " button will be clickable.
2.
if dum1 and dum2 is not selected at all, the " install " button will never be able to click to proceed to install.
Thanks people who had been helping me.
Jnuw
23rd May 2006 22:05 UTC
Hi rxs2k5. Try this.
Add the below !define above your Components page macro:
!define MUI_PAGE_CUSTOMFUNCTION_SHOW ".onSelChange"
!insertmacro MUI_PAGE_COMPONENTS
Then add this function:
Function .onSelChange
SectionGetFlags "${SEC01}" $0
StrCmp $0 1 Enable
SectionGetFlags "${SEC02}" $0
StrCmp $0 1 Enable
GetDlgItem $0 $HWNDPARENT 1
EnableWindow $0 0
Goto End
Enable:
GetDlgItem $0 $HWNDPARENT 1
EnableWindow $0 1
End:
FunctionEnd
Hope this helps.
-Jnuw
rxs2k5
24th May 2006 14:03 UTC
Hi Jnuw,
Thank you so much this is just what I need and now i understand further how does this work.
Next thing still the same but I am using different method.
The problem is here
section AA SEC0000
section end
section bb SEC0001
section end
Now I will like to see if there's other way to script it in such a way where if SEC0000 is selected, the install button will highlight and SEC0001 will be deselected.
if SEC0001 is selected, the install button will highlight and SEC0000 will be deselected.
Jnuw
24th May 2006 14:44 UTC
Check out .\NSIS\Examples\one-section.nsi within your NSIS folder.
It should show you how to do what you want.
-jnuw
rxs2k5
24th May 2006 15:14 UTC
yes i currently using that. just to check out is there other ways only