Hi,
Please
I have a problem with my components page, I have three sections and I want at least one section is selected to advance to the next page...
i use
!insertmacro MUI_PAGE_COMPONENTS
Page custom ComponentsPageLeave
page next
....
....
section 1
sectionEnd
section 2
sectionEnd
section 3
sectionEnd
Function ComponentsPageLeave
${Unless} ${SectionIsSelected} ${1}
${AndUnless} ${SectionIsSelected} ${2}
${AndUnless} ${SectionIsSelected} ${}
MessageBox MB_OK|MB_ICONINFORMATION `Please select at least one section.`
Abort
${EndUnless}
FunctionEnd
if I select any section I have the message but I go to the next page 🙁 .
please can you help me.
thx.
page componenets
2 posts
Try like this:
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE ComponentsPageLeave ;put BEFORE page macro
!insertmacro MUI_PAGE_COMPONENTS ;ensure there is no other "!insertmacro" in between!
section "Test 1" sec_id1
sectionEnd
section "Test 2" sec_id2
sectionEnd
section "Test 3" sec_id3
sectionEnd
Function ComponentsPageLeave
${Unless} ${SectionIsSelected} ${sec_id1}
${AndUnless} ${SectionIsSelected} ${sec_id2}
${AndUnless} ${SectionIsSelected} ${sec_id3}
MessageBox MB_OK|MB_ICONINFORMATION `Please select at least one section.`
Abort
${EndUnless}
FunctionEnd