Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capture file

Status
Not open for further replies.

hernanhr

MIS
Jun 7, 2001
15
0
0
US
Can anyone help me or is it even possible?

I need a script file that will open a capture file with the name of C:\logs\SB<Date><time>.txt i.e. &quot;C:\LOGS\SB053030915.txt&quot; and then capture all the data that comes across the screen until the words &quot;Burnin Complete&quot; comes across the screen. At that point it will close the capture file and reopen a new one to begin the process all over again.

Thanks

hrh
 
Thanks to all but I did manage to find out how to get this to work.

I do have another problem.
How to I get two windows open one connect to com 1 and the other connected to com 2.

Comm 1 will be used as a terminal screen and Comm 2 to capture the data.

Thanks

hrh
 
You can use the set modem connection command in a script to specify what connection should be used. The syntax is:

set modem connection &quot;connection_name&quot;

where connection_name is replaced by the modem or direct connection as it appears at the bottom of the Procomm window. You would need two scripts, one for each connection you want to use. You would then create two desktop shortcuts and associate one script with each shortcut, then rename the shortcuts so it is obvious which connection each shortcut will set itself to.


aspect@aspectscripting.com
 
I'd love to see a script example of how you accomplished the solution to the original question - could you post it?
 
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 &quot;WHEN LOADING IS COMPLETE&quot;. The capture file automatically closes when it sees the words &quot;* * * B U R N - I N T E S T H A S C O M P L E T E D * * *&quot;. After it closes the file it puts it into the c:\logs directory and renames it to &quot;SB_<Date>_<Time>&quot;.

I used a batch file &quot;SingleBoardMain.bat&quot; to start both instances.
*****************************
@echo off
cls
start &quot;c:\program files\symantec\procomm plus\programs\pw5.exe&quot; &quot;D:\SingleBoard\SingleBoardTerminal.wax&quot;
start &quot;c:\program files\symantec\procomm plus\programs\pw5.exe&quot; &quot;D:\SingleBoard\SingleBoardCapture.wax&quot;
*****************************
The terminal window as started using D:\SingleBoard\SingleBoardTerminal.wax and looks like this:

proc main
set modem connection &quot;direct connect-Com1&quot;
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 &quot;D:\SingleBoard\SingleBoardCapture.wax&quot; and looks like this:

proc main

string sCapPath, sCapFile, sCapFile2, sNewFile
integer iDay, iMonth, iYear, iHour, iMin, iSec
set modem connection &quot;direct connect-Com2&quot;
set port baudrate 4800
set port parity even
set port databits 7
set port stopbits 1
set capture path &quot;c:\logs&quot;
set capture file &quot;temp.txt&quot;

fetch capture path sCapPath

while 1
clear
waitfor &quot;WHEN LOADING IS COMPLETE&quot; forever
capture on
waitfor &quot;* * * B U R N - I N T E S T H A S C O M P L E T E D * * *&quot; forever
capture off
ltimeints $LTIME iYear iMonth iDay iHour iMin iSec
strfmt sNewFile &quot;%s%d%02d%02d%s%02d%02d&quot; &quot;SB_&quot; iYear iMonth iDay &quot;_&quot; iHour iMin
strcat sNewfile &quot;.TXT&quot;
strfmt sCapFile &quot;%s\temp.txt&quot; sCapPath
strfmt sCapFile2 &quot;%s\%s&quot; sCapPath sNewFile
shortpath sCapFile sCapFile
rename sCapFile sCapFile2
; usermsg sNewfile
endwhile
endproc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top