Malium here's how I did it, hope this help.
The idea is to start two separate instances of Procomm Plus, one on Com 1 and the other on Com 2. Com1 will be used as the terminal interface and Com 2 is used to start a capture file when it sees the words "WHEN LOADING IS COMPLETE". The capture file automatically closes when it sees the words "* * * B U R N - I N T E S T H A S C O M P L E T E D * * *". After it closes the file it puts it into the c:\logs directory and renames it to "SB_<Date>_<Time>".
I used a batch file "SingleBoardMain.bat" to start both instances.
*****************************
@echo off
cls
start "c:\program files\symantec\procomm plus\programs\pw5.exe" "D:\SingleBoard\SingleBoardTerminal.wax"
start "c:\program files\symantec\procomm plus\programs\pw5.exe" "D:\SingleBoard\SingleBoardCapture.wax"
*****************************
The terminal window as started using D:\SingleBoard\SingleBoardTerminal.wax and looks like this:
proc main
set modem connection "direct connect-Com1"
set port baudrate 19200
set terminal type ADM5
set port parity even
set port databits 7
set port stopbits 1
endproc
*********************************************
The capture window was stared using "D:\SingleBoard\SingleBoardCapture.wax" and looks like this:
proc main
string sCapPath, sCapFile, sCapFile2, sNewFile
integer iDay, iMonth, iYear, iHour, iMin, iSec
set modem connection "direct connect-Com2"
set port baudrate 4800
set port parity even
set port databits 7
set port stopbits 1
set capture path "c:\logs"
set capture file "temp.txt"
fetch capture path sCapPath
while 1
clear
waitfor "WHEN LOADING IS COMPLETE" forever
capture on
waitfor "* * * B U R N - I N T E S T H A S C O M P L E T E D * * *" forever
capture off
ltimeints $LTIME iYear iMonth iDay iHour iMin iSec
strfmt sNewFile "%s%d%02d%02d%s%02d%02d" "SB_" iYear iMonth iDay "_" iHour iMin
strcat sNewfile ".TXT"
strfmt sCapFile "%s\temp.txt" sCapPath
strfmt sCapFile2 "%s\%s" sCapPath sNewFile
shortpath sCapFile sCapFile
rename sCapFile sCapFile2
; usermsg sNewfile
endwhile
endproc