Archive: SectionSetText problem


SectionSetText problem
I make a script to change section text in runtime

Name "Temp"
OutFile ".\temp.exe"

Page components
Page instfiles

Section test1 sec1
SectionEnd

Section test2 sec2
SectionEnd

Function .onInit
SectionGetText ${sec1} $0
SectionSetText ${sec1} "$0 (Why?)"
SectionGetText ${sec2} $0
SectionSetText ${sec2} "$0 (Why?)"
FunctionEnd
The really name of the two is "test1" and " test2", but in this case is same. What's wrong of me?

Try changing the output var:


SectionGetText ${sec1} $0
SectionSetText ${sec1} "$0 (Why?)"
SectionGetText ${sec2} $1
SectionSetText ${sec2} "$1 (Why?)"

This code works. but, if I have 100 section I must build 100 variables? Why the variable $0 store value not change?


I don't know, possible bug in the instruction? :weird:

Don't know....


Help, I want it use like

SectionGetFlags ${SECTION} $0
IntOp $1 1 ~
IntOp $0 $0 & $1
SectionSetFlags ${SECTION} $0
:(

Section texts are only parsed when the components page is shown. There have been some threads about this, you can find some solutions there.