I've created the aspect script listed below. The purpose of the script is to open a capture file, wait until the phrase "Protocol Complete" comes in and then write the capture file to the hard drive with the name WP5-9 followed by the current date and time. Everything seems to be working OK but there is nothing in the capture files. None of the text is there but there are files with the names that should be there. Can anyone tell me why nothing gets stored? Thanks in advance.
Ernie
#define DEBUG 0
string fname ;first part of file name
string datefilename ;this is the date part of file name
proc main
set port baudrate 9600
set port databits 8
set port parity NONE
set port stopbits 1
set port hardflow OFF
set port softflow OFF
set modem connection "direct connect-Com1"
set terminal type ANSIBBS
clear ;clear screen
set capture autostart ON
while 1
when TARGET 0 "Protocol Complete" call write_file
endwhile
endproc
proc file_date
integer iMonth, iDay, iYear, iHour, iMin, iSec
ltimeints $LTIME iMonth iDay iYear iHour iMin iSec
strfmt dateFileName "%02d%02d%02d%02d%02d" iMonth iDay iYear iHour iMin
strcat dateFileName ".TXT"
endproc
proc Write_file
fname = "WP5-9_" ;put the first part of name here leave a space at the end
datefilename = "" ;to ensure string datefilename is empty
call file_date ;calls file_date proc
strcat fname datefilename ;this combines the two string (in this case WP5_9 YYYYMMDD)
set capture path "l:\"
set capture file fname ;sets caputure file to the file named in file_date proc
endproc
Ernie
#define DEBUG 0
string fname ;first part of file name
string datefilename ;this is the date part of file name
proc main
set port baudrate 9600
set port databits 8
set port parity NONE
set port stopbits 1
set port hardflow OFF
set port softflow OFF
set modem connection "direct connect-Com1"
set terminal type ANSIBBS
clear ;clear screen
set capture autostart ON
while 1
when TARGET 0 "Protocol Complete" call write_file
endwhile
endproc
proc file_date
integer iMonth, iDay, iYear, iHour, iMin, iSec
ltimeints $LTIME iMonth iDay iYear iHour iMin iSec
strfmt dateFileName "%02d%02d%02d%02d%02d" iMonth iDay iYear iHour iMin
strcat dateFileName ".TXT"
endproc
proc Write_file
fname = "WP5-9_" ;put the first part of name here leave a space at the end
datefilename = "" ;to ensure string datefilename is empty
call file_date ;calls file_date proc
strcat fname datefilename ;this combines the two string (in this case WP5_9 YYYYMMDD)
set capture path "l:\"
set capture file fname ;sets caputure file to the file named in file_date proc
endproc