Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 24th October 2003, 08:55   #1
vbgunz
Senior Member
 
Join Date: Jun 2003
Posts: 284
Send a message via AIM to vbgunz
Delete lines marked with #BEGIN_# to (*.*) lines marked with #END_#

Hello Users,

I need to know how to open a file, delete line a, all lines between line a, until line z and then delete line z. I already know how to write lines. I just need to know how to delete them.

There is no telling what the line number is and it is surely unpredictable. I can not chase down line numbers. I need to chase down line markers.

I need to tell the installer to look for...
#BEGIN_0#
Delete the above line, everything following it, until it reaches
#END_0#
And delete the above line too (#END_0#).

Can someone write up a small and simple script detailing how best to acheive this effect?

Thank you very much for your assistance and time on this. It is greatly appreciated!

Victor B. Gonzalez
vbgunz is offline   Reply With Quote
Old 24th October 2003, 11:38   #2
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,718
There are many examples available at the archive. Just read the content except the lines you want to delete and then write it back.
Joost Verburg is offline   Reply With Quote
Old 24th October 2003, 23:19   #3
vbgunz
Senior Member
 
Join Date: Jun 2003
Posts: 284
Send a message via AIM to vbgunz
Thank you joost,

Unfortunately I looked both on the forums and archives and believe I am only finding variations of what I am asking. I cannot find exactly what it is I am looking for

If possible, can someone be kind enough to help out with this request?

Thank you for your time and assistance! It is greatly appreciated!

Victor B. Gonzalez
vbgunz is offline   Reply With Quote
Old 25th October 2003, 10:39   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Shropshire, England
Posts: 6,887
I wrote this function to do exactly what you want:
http://nsis.sourceforge.net/archive/...49&instances=0

Don't worry, it didn't take long to write.

-Stu
Afrow UK is offline   Reply With Quote
Old 25th October 2003, 20:04   #5
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,350
Send a message via ICQ to deguix
Now, will be too long to search throught the Archive for old pages (the search have to be better too, adding an option only to search the page title or text of it)... More organization will be good...

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 11th June 2008, 01:22   #6
Trestkon
Junior Member
 
Join Date: Nov 2003
Location: Canada
Posts: 18
I apologize for resurrecting this ancient thread, but I figured it'd keep similar information together.

I'm looking for basically this exact script, except it would delete from line A to line B, excluding lines A and B. I've been staring at the code for a while and basically have no clue how to modify it to my needs. I'm hoping someone more NSIS inclined could help me out

Thanks!

EDIT: Yes, I'm an idiot. I just found the code in the archive. Thanks Afrow
Trestkon is offline   Reply With Quote
Reply
Go Back   Winamp 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


All times are GMT. The time now is 22:27.