Archive: Need a little help with ${AndIfNot}


Need a little help with ${AndIfNot}
In function .onSelChange

${IfNot} ${SectionIsSelected} "${Section1}"
!insertmacro UnselectSection "${Section3}"
!insertmacro UnselectSection "${Section4}"
!insertmacro UnselectSection "${Section5}"
!insertmacro UnselectSection "${Section6}"
${EndIf}

${IfNot} ${SectionIsSelected} "${Section2}"
${AndIfNot} ${SectionIsSelected} "${Section1}"
!insertmacro UnselectSection "${Section7}"
!insertmacro UnselectSection "${Section8}"
${EndIf}


Hi All, I am having trouble with the ${AndIfNot} logic in my .onSelChange function for Uninstall selectable sections. If section 1 is selected certain sections can be uninstalled and if it's not then they stay as unselectable and this is working and what I want, I want the same behaviour if section 1 and 2 are both selected then 7 and 8 can be uninstalled but if they aren' t then they stay as unselectable. Why is this not working for the ${AndIfNot} ???? any ideas?


there must be someone out there who has experience using this logic?


You need to use ${OrIfNot}?

Right now it says...
"If both Section 1 AND Section 2 are NOT selected, then deselect Sections 7 and 8"

While you're trying to go for..
"If either Section 1 OR Section 2 are NOT selected, then deselect Sections 7 and 8"


thanks, seems to be working for how I want it to function.