Skip to content
⌘ NSIS Forum Archive

reading INI strings consecutively

2 posts

rapigator#

reading INI strings consecutively

i have the INI file set up like this :
[Download]
site1=http://www.winsite.com/blah.zip
site2=http://nasa.gov/blah.zip
site3=http://somewhere.edu/blah.zip
how would i use NSIS to read the first site, do something, then read the second site and so on when the number of "site" lines is not definite?(it could be more than 10)
Guest#
StrCpy $0 0
loop:
IntOp $0 $0 + 1
ReadIniStr $1 [the ini] "Download" "site$0"
StrCmp $1 "" ExitLoop
; do something
Goto loop
Exitloop:
would do such a thing.

-Hendri.