Archive: SectionSetFlags in 2.0b0


SectionSetFlags in 2.0b0
  I want to turn on or off a subsection depending on whether
the other one section is checked. I know I can use
SectionGetFlags and SectionSetFlags to do so. When I tried
to do this, I found the subsection was just set off and I
could never turn it back to on. I don't know where I did
wrong. Besides, It was fine in 2.0a7.

attached a example script:


To find out if a section is turned on use:

SectionGetFlags${SECNAME} $R0

IntOp $R0 $R0& ${SF_SELECTED}
>IntCmp $R0 0 sectionOff 0 0
; Do something if section is turned on
sectionOff:
To turn a section off use:

SectionGetFlags ${SECNAME} $R0

IntOp $R0 $R0& ${SECTION_OFF}
>SectionSetFlags ${SECNAME} $R0
>

Thanks, Kichik. :D
I also notice one thing that I must set the fifth argument
of IntCmp, then it will work properly as what I want.