Old 24th July 2002, 18:52   #1
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,363
Question Read lines in .TXT files

is it possible to read every line of a textfile and use every entry in a string?

what if this requires more than twenty strings? can i reuse the same string name later.

i want nsis to read lines of a textfile and use the lines for further actions (lets say messagebox for instance)
Yathosho is offline   Reply With Quote
Old 24th July 2002, 19:15   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Like you said, there are only 20 strings available, and NSIS max string length is 1024 (the default), so no, you can't save the whole text file in memory if it has more than 20 lines.

Why can't you process line by line and just save the lines you need?

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 29th July 2002, 05:00   #3
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,363
well, thats what i asked for. maybe you could post the code to report every line of a text file in a messagebox.

i think it should be possible with just one string, but i am bad in strings.
Yathosho is offline   Reply With Quote
Old 29th July 2002, 10:07   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Read the code I wrote here. Just replace the FileWrite and the strring comparsion with a message box.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 30th October 2012, 02:53   #5
PoRtAbLe_StEaLtH
Junior Member
 
Join Date: Jul 2011
Posts: 49
Quote:
Originally Posted by kichik View Post
Read the code I wrote here. Just replace the FileWrite and the strring comparsion with a message box.
thank you, stuck in house while Sandy blows through,
improving a few things in my coding.
and this code helped tremendously.

you and Afrow UK are the only ones i've seen that actually help.
most waste their time patronizing.
that time they wasted, they could've just created a quick example.
something i don't understand.

thank you to you and Afrow UK.
You guys are very generous,
Bless you guys.
PoRtAbLe_StEaLtH 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