05-08-2024, 09:21 PM
Code: (Select All)
Open "program_name.bas" For Binary As #1
Open "expanded_program_name.bas" For Output As #2
Do Until EOF(1)
Line Input #1, temp$
While InStr(temp$, ":")
o$ = Left$(temp$, InStr(temp$, ":") - 1)
Print #2, o$
temp$ = Mid$(temp$, InStr(temp$, ":") + 1)
Wend
Print #2, temp$
Loop
close
Wouldn't a simple translator like this work the best? Read the file, convert the : into CRLF.
As long as there's no : in quotes, it should work without any issues. Otherwise, you'll have to expand it to do some logic checking to see if it's in quote or not.