bluenet
8th September 2004 12:31 UTC
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?
Joel
8th September 2004 15:00 UTC
Try changing the output var:
SectionGetText ${sec1} $0
SectionSetText ${sec1} "$0 (Why?)"
SectionGetText ${sec2} $1
SectionSetText ${sec2} "$1 (Why?)"
bluenet
8th September 2004 15:21 UTC
This code works. but, if I have 100 section I must build 100 variables? Why the variable $0 store value not change?
Joel
8th September 2004 15:57 UTC
I don't know, possible bug in the instruction? :weird:
Don't know....
bluenet
9th September 2004 01:10 UTC
Help, I want it use like
SectionGetFlags ${SECTION} $0
IntOp $1 1 ~
IntOp $0 $0 & $1
SectionSetFlags ${SECTION} $0
:(
kichik
9th September 2004 18:59 UTC
Section texts are only parsed when the components page is shown. There have been some threads about this, you can find some solutions there.