We are working on converting the wiki to a static website controlled by markdown files in https://github.com/nsis-community. You can already see there how plug-ins will be posted. The end-user interface will still be a website but with a fresh coat of paint. Come meet us at Discord to talk about it.

Components Page Next Button

From NSIS Wiki
Jump to navigationJump to search
Author: Takhir (talk, contrib)


Description

Enabled 'Next' button looks confusing if none of sections selected. Function disables Next button on the components page for this situation. Simple components structure in this sample (no groups), 4 sections - use your own section names in function instead og gXX. Another way is to make one section read only and checked.

The Script

Section $(binaries) g01
 
SectionEnd
 
...
 
Function .onSelChange
 
  Push $0
  Push $1
  SectionGetFlags ${g01} $0
  IntOp $0 ${SF_SELECTED} & $0
  SectionGetFlags ${g02} $1
  IntOp $1 ${SF_SELECTED} & $1
  IntOp $0 $1 | $0
  SectionGetFlags ${g03} $1
  IntOp $1 ${SF_SELECTED} & $1
  IntOp $0 $1 | $0
  SectionGetFlags ${g04} $1
  IntOp $1 ${SF_SELECTED} & $1
  IntOp $0 $1 | $0
  GetDlgItem $1 $HWNDPARENT 1
  EnableWindow $1 $0
  Pop $1
  Pop $0
 
FunctionEnd