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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TERMMSG to CAPTURE file 1

Status
Not open for further replies.

phessup

Programmer
May 8, 2002
15
US
Given the following code fragment from ProComm 4.6 Build 71
:

STRING m_last_up_date = "10/11/02"
Proc main
SET CAPTURE FILE "test.cap"
SET CAPTURE OVERWRITE OFF
CAPTURE ON
TERMMSG "****************************************`r`n"
TERMMSG "* TEST.WAS updated: %s `r`n" m_last_up_date
TERMMSG "* Run date: %s time: %s`r`n" $DATE $TIME
TERMMSG "**************************************** `r`n"
CAPTURE OFF
termmsg "end of paultest `r`n"
pause 2
endproc

I was expecting the messages to appear in \capture\test.cap file. I do create the file, but it is zero bytes long. Am I missing some ProComm setting?

Thanks
 
The termmsg command only writes the text to the screen, but Procomm does not consider it part of the communications "stream." However, you can use the capturestr command to add the necessary text to your capture file. Be aware that the capture file must be open when using the capturestr command, so you will want to make sure the capture off command appears after the capturestr command.
aspect@aspectscripting.com
 
knob, your answer makes sense according to the ProComm User's Guide. Maybe it's a PC specific undocumented feature. The TERMMSG content does get sent to the capture file on another PC running similar logic. We're both running Windows 2000.
???
 
That's strange, I wouldn't think it would work that way. What happens if you keep the termmsg command, but move it before the capture off command? Does it get written to the capture file then?
aspect@aspectscripting.com
 
In the example, there are several TERMMSG commands before the CAPTURE OFF command.
 
I took yoru sript, ran it on a machine with version 4.8, and saw the expected output in the capture file. If the same script is producing different output on two machines, I would first check that the capture settings are the same between the two machines. You can do this by selecting the Options | Data Options | Setup Files menu item in Procomm and clicking on the Setup button to the right of the Capture listbox.
aspect@aspectscripting.com
 
I made screen shots from the PC that produces TERMMSG in a capture file and used the shots to apply the same settings to my PC:
System>System Options
Data>Data Options General, Data Options Advanced, Data options Paths
Data>Transfer Protocol
Data>Terminal Options
Data>Setup Files
Data>Setup Files>Capture File Options

A bit of overkill, I suppose. Nonetheless, the TERMMSG commands per the above script on my PC still don't produce anything more than a zero byte o/p file in the \capture\ directory. I even added a "PAUSE 10" after CAPTURE OFF to give the capture file time to close.
I still must be overlooking something.
Thanks for your help.
 
Are both machines running the same version of Procomm and Windows? I just noticed that you were running version 4.6. I don't think I have my 4.6 CD handy, but will try installing that to see if I can reproduce the problem with that version.
aspect@aspectscripting.com
 
Beg pardon. Version 4.8 build 71. Windows 2000. Same behavior with 4.7 and Windows 2000.
 
I seem to recall a couple problems with capture files on Windows 2000. Here is a snippet from my web site that I believe was encountered on Windows 2000. Does this match the scenario that you are running your script under?

A recent problem I experienced had to do with a capture file not containing all of the expected data if Procomm Plus was started in a minimized state. The workaround for this problem was to start Procomm as a regular window, but include the line "winminimize $PWMAINWIN" at the end of the STARTUP.WAS script. This still causes the Procomm Plus splash screen to appear for a short time, but at least no data will be lost. aspect@aspectscripting.com
 
While I did not think the "winminimize..." suggestion was applicable to my own case, I did as you suggested. It worked!!! Then I took the "winminimize..." back out of my STARTUP.WAS and the TERMMSG to CAPTURE still worked. At least one logical conclusion is that STARTUP.WAS just needed to be recompiled.
You have broken a 3 day mental logjam. Many Thanks!!!
Your website is also a rich goldmine. Glad I went there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top