Old 29th July 2003, 11:03   #1
kukymann
Junior Member
 
Join Date: Jul 2003
Posts: 5
Name of Section from TXT file

Hi, i have 25 sections, and i need put name for all Sections and Subsections from txt file.
Structure this file is:
title.txt
code:

title=01 section


For all sections is one directory with one txt file "title.txt"
Structure directory is:

Root
|
install.exe
|- 01
| |- title.txt
|
|- 02
| |- title.txt
...
|- 25
|- title.txt

My solution:
code:

Section "$1"
SectionEnd

Section "$2"
SectionEnd

Function .onInit
FileOpen $R1 "$EXEDIR\01\title.txt" r
FileRead $R1 $R2
StrCpy $1 $R2 "" 6
FileClose $R1

FileOpen $R1 "$EXEDIR\02\title.txt" r
FileRead $R1 $R2
StrCpy $2 $R2 "" 6
FileClose $R1

FunctionEnd



But this is not good, because user variables is only 20, and i have 25 sections. So, what can i do? Any reason? Thx
kukymann is offline   Reply With Quote
Old 29th July 2003, 12:36   #2
Vytautas
Major Dude
 
Vytautas's Avatar
 
Join Date: May 2003
Location: Victoria, Australia
Posts: 643
Send a message via ICQ to Vytautas
If your are using the latest version of NSIS 2.0b4(CVS) it has support for unlimited user variables, see the 'var' command in the readme file.

Vytautas
Vytautas is offline   Reply With Quote
Old 29th July 2003, 13:05   #3
kukymann
Junior Member
 
Join Date: Jul 2003
Posts: 5
thx, i'm using NSIS 2.0b3
kukymann is offline   Reply With Quote
Old 29th July 2003, 13:09   #4
Vytautas
Major Dude
 
Vytautas's Avatar
 
Join Date: May 2003
Location: Victoria, Australia
Posts: 643
Send a message via ICQ to Vytautas
You can get the latest version here however you should note that you will most likely have to modify your existing scripts to work with the newer version of NSIS.

Vytautas
Vytautas is offline   Reply With Quote
Old 29th July 2003, 14:03   #5
kukymann
Junior Member
 
Join Date: Jul 2003
Posts: 5
thx, it's worked.
kukymann 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