Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Editing text files with NSIS or creating a dll to do so (http://forums.winamp.com/showthread.php?t=270066)

fivesix 24th April 2007 05:01

Editing text files with NSIS or creating a dll to do so
 
Hi,

I've been using NSIS for a few years now, not only as a installer but also to configure existing applications and scripting stuff in general, and as a non programmer I think it is a brilliant language, simple to learn, excellent help, useful forums and able to simply do almost anything that I could want... except edit text files.

I've searched the help, forums, plugin's and google and keep struggling when I want to modify text files. I want to do simple stuff line find and replace text as well as things like
  • * Find a line like foo and replace the whole line with foo=bar
    * Append line foo=bar if foo doesn't exist
    * Find line like foo and return the line number and/or whole line
    * Insert foo at line number 3 moving everything else down
If all this is possible and I've missed it then could somebody please provide the links that I missed to do this stuff.

Recently this has been bugging me enough that I tried making a dll to use as a plugin but failed miserably, I ended up writing a simple cli application in VB.net (I know some vb via excel) and used ExecWait, the logic and code turned out to be incredibly simple. I'd really like to do the dll as opposed to the cli but have been unable to find a simple example. Is there a Hello World tutorial for creating dll's? Is Visual Studio Express suitable to create dll's with? Am I biting off more than I can chew?

Red Wine 24th April 2007 08:01

http://nsis.sourceforge.net/Docs/AppendixE.html#E.2

http://nsis.sourceforge.net/Docs/AppendixE.html#E.3

fivesix 26th April 2007 03:50

Thanks for the link, I suppose I should update from 2.06, might have helped me find that.

At a quick glance I guess it could do most of the things that I need although it doesn't appear to be very simple, I guess I'll have to update and see if I break anything before giving it a go.

Red Wine 26th April 2007 05:04

Certainly it can do all what you need and even more, believe me within a few lines of code.

All you need are some experiencing rounds to evaluate it. :)


All times are GMT. The time now is 04:10.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.