|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Senior Member
|
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 |
|
|
|
|
|
#2 |
|
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.
|
|
|
|
|
|
#3 |
|
Senior Member
|
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 |
|
|
|
|
|
#4 |
|
Moderator
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 |
|
|
|
|
|
#5 |
|
Major Dude
|
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...
|
|
|
|
|
|
#6 |
|
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 |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|