|
<< Click to Display Table of Contents >> Handling different ways SpecView exits |
![]() ![]()
|
It is possible to setup SpecView to make it take some action when it exits under the following circumstances:
| • | If it is exited normally (which would catch if a user exited SpecView accidentally). |
| • | Or if it were to crash. |
| • | Or if comms stops. |
Here are examples of BATch (.BAT) files that can be used in these cases:
To run a BATch file on Normal Exit of SpecView:
SETTINGS.INI:
[Settings]
ExitProgToRun=C:\SV3\SomeBATchFile.BAT
ExtProgDispMode=M or N or F (see notes below)
To run a BATch file on CRASH of SpecView: (see notes below)
SETTINGS.INI:
[Settings]
CrashProgToRun=C:\SV3\SomeOtherBATchFile.BAT
ExtProgDispMode=M or N or F (see notes below)
This will work regardless of Procdump or Minidump mode being enabled or not.
To run a BATch file on GoodComms stopping: (i.e. Trend Chart pen lines 'flatlining')
SV3.INI
[Watchdog]
CommsWatchdogSecs=60
Restart=Y
Then if this happens, SpecView will run: AUTORESTARTSV_EXTRA.BAT in the same folder as SV3.EXE while it is restarting
To run a BATch file on a Remote when it goes into Standby:
SV3.INI (this has to be SV3 because SETTINGS.INI gets overwritten):
[Networking]
RemoteStandbyBatchFile=C:\SV3\SomeOtherBATchFileAgain.BAT
Notes on the BATch files:
| • | You MUST always specify the full path to the BATch file in the .INI file so that SpecView can find it. |
| • | Inside the BATch file you MUST 'CD' to somewhere first because the current working folder may not be where you think it is. |
| • | End the BATch file with a line that says: EXIT otherwise the BATch file CMD window may be left running afterwards. |
| • | The "ExtProgDisplayMode" is M for Minimized (the default), or N for Normal window display, or F for Full screen. |
| • | You can create a 'log' of the times these occurred using this command line: |
ECHO Crashed at %DATE% %TIME% >> C:\SV3\MYLOG.TXT