Here is what I want to do:
Line1To:
Line2
Line3
Line4
Line1I would like to be able to insert at least 64 lines.
Line2
---Insertion1---
Line3
Line4
---Insertion2---
Thanks for any help.
2 posts
Line1To:
Line2
Line3
Line4
Line1I would like to be able to insert at least 64 lines.
Line2
---Insertion1---
Line3
Line4
---Insertion2---
Name "Output"
OutFile "Output.exe"
!include "TextFunc.nsh"
!insertmacro LineFind
Section
${LineFind} "C:\input.txt" "C:\output.txt" "3 5 8" LineFindCallback
IfErrors 0 +2
MessageBox MB_OK "Error"
SectionEnd
Function LineFindCallback
StrCmp $R8 3 0 next
FileWrite $R4 "---Insertion1a---$\r$\n"
FileWrite $R4 "---Insertion1b---$\r$\n"
goto end
next:
StrCmp $R8 5 0 next2
FileWrite $R4 "---Insertion2---$\r$\n"
goto end
next2:
StrCmp $R8 8 0 end
FileWrite $R4 "---Insertion3---$\r$\n"
goto end
end:
Push 0
FunctionEnd