The app will create a backup copy and place it in the Backups folder
it will then remove all lines in the script that START with a " ; " and produce an edited script named "_reduced.nsi"
it will then automatically open the new script in the default program for nsi files (which is Notepad2 for me).
Code: Select all
only one script at a time.
If multiple scripts are present it will edit the first one attained
alphabetically and simply copy the rest to the Backups folder.
If there is space in front of the comment symbol it is not interpretted as a comment and will be skipped.
Thus if a comment is located in the middle of a line of text it goes unedited.
We need it to clear the rest of the line from wherever the symbol is located in the line...
whether its the first character or not.
Also because of the way lines are currently removed,large gaps are left in the script.
NSIS text replace (as far as I can find in my research) doesnt allow for replacing "spaces"
and I can only designate one symbol as a comment indicator (AFAIK).
I would like for it to reduce multiple blank lines to a single blank line and also use " \ " and " # "
as comment indicators or have some sort of config ini for the user to enter their own selections for this.
The use of a "DropBox" folder is a work around for my lack of knowledge about NSIS scripting in general.
An "input" and "output" name is required for the script to work as its currently written.
So this app is actually 2 little programs working together,
one that copies and renames files in the DropBox and the other
that works from the temp folder to do the actual editing.
It would be optimal to be able to just drag and drop files onto the exe and do away with
the DropBox folder altogether.
And having the app simply add the "_reduced" tag to the end of the original file name wouldnt be bad either.
I have seen some of Crownixx's AutoIT programs that do this but I know even less about AutoIT
"ConTEXT Editor" also uncomments lines beautifully...unfortunately thats the only thing I reallly find appealing about it.I dont want another text editor hanging around for no other reason than to tidy up my messes.
I really am trying for a small exe with this one function that would ideally work with a shortcut in the send to folder
Having the file open when complete can be done away with,
its only purpose is to make renaming (and editing the blanks) a little quicker.
I have included the nsis scripts for recompiling the NoComment EXE
I welcome anyone to edit and improve on this...just be sure to share any progress you make.
Any help sorting/fixing these things is much appreciated....but please dont limit your solutions to NSIS scripting.
If you know of a lightweight program specifically for such actions or if you know how to do this in some other script language ,let me know
Thanks in advance.