Disable the Next button on the component page if there are no selected components

I use NSIS 2.46 to create an installer for my Windows application, I have a component page with 12 flags, that is 12 sections in my NSIS code, now I want to disable the "Next" button, if none of the sections are checked by the user, I use this the code: NSIS Code

Somehow he does not accept R-registers above R9 ...

    SectionGetFlags ${section11} $R10 
    SectionGetFlags ${section12} $R11

The compiler error I get Compiler error

Please tell me how to disable the "Next" button if there are more than 10 components ...

+1
source share
1 answer

NSIS: $0... $9 $R0... $R9, $1 $2 . , ; Var /GLOBAL R10.

1 - 12 , :

!include LogicLib.nsh

Section A S_1
SectionEnd
Section /o B S_2
SectionEnd
Section C S_3
SectionEnd


Function .onSelChange
StrCpy $0 0
StrCpy $1 ${S_1}
${DoWhile} $1 <= ${S_3}
    ${If} ${SectionIsSelected} $1
        StrCpy $0 1
        ${ExitDo}
    ${EndIf}
    IntOp $1 $1 + 1
${Loop}
GetDlgItem $1 $HwndParent 1
EnableWindow $1 $0
FunctionEnd
+3

Source: https://habr.com/ru/post/1761887/


All Articles