Skip to content
⌘ NSIS Forum Archive

gflag iteration

5 posts

zeeh3#

gflag iteration

Is it possible to iterate in a loop through !define gflags names? For example, get values of ${Stuff$1}, where $1 is a number in ascending order? This example does not work:

!define Stuff00    "D939D0765789"
!define Stuff01    "2983C201F3A4"
!define Stuff02    "5DC3"
...
    StrCpy $2 ""
    ${For} $0 0 2
        IntFmt $1 "%02d" $0
        StrCpy $2 $2${Stuff$1}
    ${Next} 
aerDNA#
Many times I wished something like that was doable but it isn't. No such thing as compile time loops/variables.
Anders#
You can generate a batchfile with !appendfile and run it with !system and do the looping in the batchfile and generate a .nsh