I have made some progress but I am stumped, I am still trying to figure out how to only output the information that is within the quotes. I was able to start to output based on the " but am uncertain how to output every character on the same line until it sees the second quote, then insert a new line and loop. Thanks in advance for the help.
proc main
string FName ; Name of file to read.
string FName2 ; Name of file to create.
;string CName
string LineInfo
string LineInfo2
clear
;sdlginput "Capture Name" "Name:" CName
;set capture file CName
;capture on
if sdlginput "File Name" "Name:" FName
sdlginput "Output File Name" "Name:" FName2
if isfile FName ; Make sure file exists.
if fopen 0 Fname READ ; Open input file for read.
if fopen 1 FName2 CREATE TEXT ; Create output file.
while not feof 0 ; Loop while not at end of file.
fread 0 LineInfo 2
if strchr LineInfo '"' ; Check for target text in string.
while not feof 0
fread 0 LineInfo2 2
if LineInfo2'"'
else
fputs 1 LineInfo2
endif
endwhile
usermsg "value `"%s`" " LineInfo
else
usermsg "Target string not found in search string!"
endif
endwhile
fclose 1 ; Close our output file.
else
errormsg "Couldn't open `"%s`" for output." FName2
endif
fclose 0 ; Close the file.
endif
else
errormsg "File doesn't exist."
endif
endif
pause 9 ;pause for terminal completion
;capture off ;end capture
endproc
proc main
string FName ; Name of file to read.
string FName2 ; Name of file to create.
;string CName
string LineInfo
string LineInfo2
clear
;sdlginput "Capture Name" "Name:" CName
;set capture file CName
;capture on
if sdlginput "File Name" "Name:" FName
sdlginput "Output File Name" "Name:" FName2
if isfile FName ; Make sure file exists.
if fopen 0 Fname READ ; Open input file for read.
if fopen 1 FName2 CREATE TEXT ; Create output file.
while not feof 0 ; Loop while not at end of file.
fread 0 LineInfo 2
if strchr LineInfo '"' ; Check for target text in string.
while not feof 0
fread 0 LineInfo2 2
if LineInfo2'"'
else
fputs 1 LineInfo2
endif
endwhile
usermsg "value `"%s`" " LineInfo
else
usermsg "Target string not found in search string!"
endif
endwhile
fclose 1 ; Close our output file.
else
errormsg "Couldn't open `"%s`" for output." FName2
endif
fclose 0 ; Close the file.
endif
else
errormsg "File doesn't exist."
endif
endif
pause 9 ;pause for terminal completion
;capture off ;end capture
endproc