Old 1st July 2013, 18:50   #1
zeeh3
Senior Member
 
Join Date: Aug 2005
Posts: 121
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:

PHP Code:
!define Stuff00    "D939D0765789"
!define Stuff01    "2983C201F3A4"
!define Stuff02    "5DC3"
...
    
StrCpy $""

    
${For} $0 0 2

        IntFmt 
$"%02d" $0
        StrCpy 
$$2${Stuff$1}

    ${
Next
zeeh3 is offline   Reply With Quote
Old 1st July 2013, 19:17   #2
aerDNA
Senior Member
 
aerDNA's Avatar
 
Join Date: Feb 2007
Location: Rijeka, Croatia
Posts: 225
Many times I wished something like that was doable but it isn't. No such thing as compile time loops/variables.

PostEnd:
aerDNA is offline   Reply With Quote
Old 1st July 2013, 19:19   #3
zeeh3
Senior Member
 
Join Date: Aug 2005
Posts: 121
Ok, thanks anyway.
zeeh3 is offline   Reply With Quote
Old 1st July 2013, 20:53   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,418
You can generate a batchfile with !appendfile and run it with !system and do the looping in the batchfile and generate a .nsh

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 1st July 2013, 21:58   #5
aerDNA
Senior Member
 
aerDNA's Avatar
 
Join Date: Feb 2007
Location: Rijeka, Croatia
Posts: 225
I knew that my "it can't be done" would draw a wizard out.

PostEnd:
aerDNA is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump