All,
Is is possible to add line numbers to VB6 source code within FinalBuilder?
Thanks,
Dave
Hi Dave,
Yes, this should be possible. Off the top of my head, this is what I’d do:
Create a Project variable to hold the line number “LineNo” set it to 1
Create a Project variable to hold the contents of the new file "NewFileContents"
Create a Project variable to hold the current line of the file "CurrentLine"
Use a File Contents Iterator and set it to the file you want and set the variable to CurrentLine
Add a Run Script Action as a child of the Iterator
Put this code in the OnExecute:
NewFileContents = NewFileContents & vbCRLF & LineNo & " : " & CurrentLine
LineNo = LineNo + 1
Then put a Create Text File action as a sibling (ie. same level) as the interator. Enter the filename and the contents will be %NewFileContents%
hth!
.t8