Old 5th January 2007, 01:05   #1
Gonthax
Junior Member
 
Join Date: Jan 2007
Posts: 2
Parsing a string of two tokens

I'm new to NSIS, and am having trouble figuring out a function that can do what I'm after. I've tried WordFind and WordReplace with limited success unfortunately, perhaps I'm just not using them correctly.

Basically I've got an installer that loops through a text file. On each line of this text file is a filename and a size, separated by a space. For example:

file1.txt 100
this is file2.txt 140

I need to read and support filenames with spaces as well, and was wondering how I can basically stuff $1 with the filename, and $2 with the file size reliably.

Thanks for the help.
~G~
Gonthax is offline   Reply With Quote
Old 5th January 2007, 05:24   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
There are some useful functions at wiki, most likely you'd find one ready for you, or modify one to suit your needs.

http://nsis.sourceforge.net/Category...ons_%26_Macros

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 5th January 2007, 11:31   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
http://nsis.sourceforge.net/Get_last...rest_of_string

-Stu
Afrow UK is offline   Reply With Quote
Old 5th January 2007, 19:06   #4
Gonthax
Junior Member
 
Join Date: Jan 2007
Posts: 2
Afrow, that was it!

Cheers
Gonthax 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